diff --git a/README.md b/README.md index d655e61..76803b1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 0.1.0 -- Package version: 4.0.3 +- Package version: 4.0.4 - Generator version: 7.9.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -196,6 +196,7 @@ Class | Method | HTTP request | Description - [PodStatus](docs/PodStatus.md) - [PrebuiltImageResponse](docs/PrebuiltImageResponse.md) - [ServiceStatus](docs/ServiceStatus.md) + - [SetupUserResponse](docs/SetupUserResponse.md) - [TicketCategory](docs/TicketCategory.md) - [TicketPriority](docs/TicketPriority.md) - [UpdateAutochargePreferencesRequest](docs/UpdateAutochargePreferencesRequest.md) diff --git a/docs/EXTERNALApi.md b/docs/EXTERNALApi.md index 9cf1fb1..d6c1328 100644 --- a/docs/EXTERNALApi.md +++ b/docs/EXTERNALApi.md @@ -2679,7 +2679,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **setup_stripe_customer_payments_setup_post** -> object setup_stripe_customer_payments_setup_post() +> SetupUserResponse setup_stripe_customer_payments_setup_post() Setup Stripe Customer @@ -2689,6 +2689,7 @@ Setup Stripe Customer ```python import platform_api_python_client +from platform_api_python_client.models.setup_user_response import SetupUserResponse from platform_api_python_client.rest import ApiException from pprint import pprint @@ -2730,7 +2731,7 @@ This endpoint does not need any parameter. ### Return type -**object** +[**SetupUserResponse**](SetupUserResponse.md) ### Authorization diff --git a/docs/SetupUserResponse.md b/docs/SetupUserResponse.md new file mode 100644 index 0000000..2a23429 --- /dev/null +++ b/docs/SetupUserResponse.md @@ -0,0 +1,29 @@ +# SetupUserResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_workos_organization_id** | **str** | | + +## Example + +```python +from platform_api_python_client.models.setup_user_response import SetupUserResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SetupUserResponse from a JSON string +setup_user_response_instance = SetupUserResponse.from_json(json) +# print the JSON string representation of the object +print(SetupUserResponse.to_json()) + +# convert the object into a dict +setup_user_response_dict = setup_user_response_instance.to_dict() +# create an instance of SetupUserResponse from a dict +setup_user_response_from_dict = SetupUserResponse.from_dict(setup_user_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/platform_api_python_client/__init__.py b/platform_api_python_client/__init__.py index 827856d..97ee315 100644 --- a/platform_api_python_client/__init__.py +++ b/platform_api_python_client/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "4.0.3" +__version__ = "4.0.4" # import apis into sdk package from platform_api_python_client.api.external_api import EXTERNALApi @@ -86,6 +86,7 @@ from platform_api_python_client.models.pod_status import PodStatus from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.setup_user_response import SetupUserResponse from platform_api_python_client.models.ticket_category import TicketCategory from platform_api_python_client.models.ticket_priority import TicketPriority from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest diff --git a/platform_api_python_client/api/external_api.py b/platform_api_python_client/api/external_api.py index 61967ef..e2517df 100644 --- a/platform_api_python_client/api/external_api.py +++ b/platform_api_python_client/api/external_api.py @@ -59,6 +59,7 @@ from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse from platform_api_python_client.models.metric import Metric from platform_api_python_client.models.payment_method_response import PaymentMethodResponse +from platform_api_python_client.models.setup_user_response import SetupUserResponse from platform_api_python_client.models.ticket_category import TicketCategory from platform_api_python_client.models.ticket_priority import TicketPriority from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest @@ -9308,7 +9309,7 @@ def setup_stripe_customer_payments_setup_post( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: + ) -> SetupUserResponse: """Setup Stripe Customer @@ -9342,7 +9343,7 @@ def setup_stripe_customer_payments_setup_post( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "SetupUserResponse", } response_data = self.api_client.call_api( *_param, @@ -9370,7 +9371,7 @@ def setup_stripe_customer_payments_setup_post_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: + ) -> ApiResponse[SetupUserResponse]: """Setup Stripe Customer @@ -9404,7 +9405,7 @@ def setup_stripe_customer_payments_setup_post_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "SetupUserResponse", } response_data = self.api_client.call_api( *_param, @@ -9466,7 +9467,7 @@ def setup_stripe_customer_payments_setup_post_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "object", + '200': "SetupUserResponse", } response_data = self.api_client.call_api( *_param, diff --git a/platform_api_python_client/api_client.py b/platform_api_python_client/api_client.py index cf7c177..a2c7c8c 100644 --- a/platform_api_python_client/api_client.py +++ b/platform_api_python_client/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/4.0.3/python' + self.user_agent = 'OpenAPI-Generator/4.0.4/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/platform_api_python_client/configuration.py b/platform_api_python_client/configuration.py index c6dfd19..5324f09 100644 --- a/platform_api_python_client/configuration.py +++ b/platform_api_python_client/configuration.py @@ -392,7 +392,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1.0\n"\ - "SDK Package Version: 4.0.3".\ + "SDK Package Version: 4.0.4".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/platform_api_python_client/models/__init__.py b/platform_api_python_client/models/__init__.py index d56876a..da86d49 100644 --- a/platform_api_python_client/models/__init__.py +++ b/platform_api_python_client/models/__init__.py @@ -69,6 +69,7 @@ from platform_api_python_client.models.pod_status import PodStatus from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse from platform_api_python_client.models.service_status import ServiceStatus +from platform_api_python_client.models.setup_user_response import SetupUserResponse from platform_api_python_client.models.ticket_category import TicketCategory from platform_api_python_client.models.ticket_priority import TicketPriority from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest diff --git a/platform_api_python_client/models/setup_user_response.py b/platform_api_python_client/models/setup_user_response.py new file mode 100644 index 0000000..086b5b0 --- /dev/null +++ b/platform_api_python_client/models/setup_user_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SetupUserResponse(BaseModel): + """ + SetupUserResponse + """ # noqa: E501 + created_workos_organization_id: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["created_workos_organization_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SetupUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_workos_organization_id (nullable) is None + # and model_fields_set contains the field + if self.created_workos_organization_id is None and "created_workos_organization_id" in self.model_fields_set: + _dict['created_workos_organization_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SetupUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_workos_organization_id": obj.get("created_workos_organization_id") + }) + return _obj + + diff --git a/pyproject.toml b/pyproject.toml index 72fed27..a99e26d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "platform_api_python_client" -version = "4.0.3" +version = "4.0.4" description = "Platform External API" authors = ["OpenAPI Generator Community "] license = "NoLicense" diff --git a/setup.py b/setup.py index 93ccb0f..3c6db3a 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "platform-api-python-client" -VERSION = "4.0.3" +VERSION = "4.0.4" PYTHON_REQUIRES = ">= 3.8" REQUIRES = [ "urllib3 >= 1.25.3, < 3.0.0", diff --git a/test/test_setup_user_response.py b/test/test_setup_user_response.py new file mode 100644 index 0000000..e5e4705 --- /dev/null +++ b/test/test_setup_user_response.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Platform External API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.1.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from platform_api_python_client.models.setup_user_response import SetupUserResponse + +class TestSetupUserResponse(unittest.TestCase): + """SetupUserResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SetupUserResponse: + """Test SetupUserResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SetupUserResponse` + """ + model = SetupUserResponse() + if include_optional: + return SetupUserResponse( + created_workos_organization_id = '' + ) + else: + return SetupUserResponse( + created_workos_organization_id = '', + ) + """ + + def testSetupUserResponse(self): + """Test SetupUserResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()