Skip to content

Commit 05e8689

Browse files
Update clients to latest platform release (4.0.9) (#38)
1 parent 741f622 commit 05e8689

File tree

12 files changed

+191
-13
lines changed

12 files changed

+191
-13
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 0.1.0
7-
- Package version: 4.0.3
7+
- Package version: 4.0.9
88
- Generator version: 7.9.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

@@ -196,6 +196,7 @@ Class | Method | HTTP request | Description
196196
- [PodStatus](docs/PodStatus.md)
197197
- [PrebuiltImageResponse](docs/PrebuiltImageResponse.md)
198198
- [ServiceStatus](docs/ServiceStatus.md)
199+
- [SetupUserResponse](docs/SetupUserResponse.md)
199200
- [TicketCategory](docs/TicketCategory.md)
200201
- [TicketPriority](docs/TicketPriority.md)
201202
- [UpdateAutochargePreferencesRequest](docs/UpdateAutochargePreferencesRequest.md)

docs/EXTERNALApi.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,7 +2679,7 @@ Name | Type | Description | Notes
26792679
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
26802680

26812681
# **setup_stripe_customer_payments_setup_post**
2682-
> object setup_stripe_customer_payments_setup_post()
2682+
> SetupUserResponse setup_stripe_customer_payments_setup_post()
26832683
26842684
Setup Stripe Customer
26852685

@@ -2689,6 +2689,7 @@ Setup Stripe Customer
26892689

26902690
```python
26912691
import platform_api_python_client
2692+
from platform_api_python_client.models.setup_user_response import SetupUserResponse
26922693
from platform_api_python_client.rest import ApiException
26932694
from pprint import pprint
26942695

@@ -2730,7 +2731,7 @@ This endpoint does not need any parameter.
27302731

27312732
### Return type
27322733

2733-
**object**
2734+
[**SetupUserResponse**](SetupUserResponse.md)
27342735

27352736
### Authorization
27362737

docs/SetupUserResponse.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SetupUserResponse
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**created_workos_organization_id** | **str** | |
9+
10+
## Example
11+
12+
```python
13+
from platform_api_python_client.models.setup_user_response import SetupUserResponse
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of SetupUserResponse from a JSON string
18+
setup_user_response_instance = SetupUserResponse.from_json(json)
19+
# print the JSON string representation of the object
20+
print(SetupUserResponse.to_json())
21+
22+
# convert the object into a dict
23+
setup_user_response_dict = setup_user_response_instance.to_dict()
24+
# create an instance of SetupUserResponse from a dict
25+
setup_user_response_from_dict = SetupUserResponse.from_dict(setup_user_response_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+

platform_api_python_client/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "4.0.3"
17+
__version__ = "4.0.9"
1818

1919
# import apis into sdk package
2020
from platform_api_python_client.api.external_api import EXTERNALApi
@@ -86,6 +86,7 @@
8686
from platform_api_python_client.models.pod_status import PodStatus
8787
from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse
8888
from platform_api_python_client.models.service_status import ServiceStatus
89+
from platform_api_python_client.models.setup_user_response import SetupUserResponse
8990
from platform_api_python_client.models.ticket_category import TicketCategory
9091
from platform_api_python_client.models.ticket_priority import TicketPriority
9192
from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest

platform_api_python_client/api/external_api.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
from platform_api_python_client.models.list_user_vault_items_response import ListUserVaultItemsResponse
6060
from platform_api_python_client.models.metric import Metric
6161
from platform_api_python_client.models.payment_method_response import PaymentMethodResponse
62+
from platform_api_python_client.models.setup_user_response import SetupUserResponse
6263
from platform_api_python_client.models.ticket_category import TicketCategory
6364
from platform_api_python_client.models.ticket_priority import TicketPriority
6465
from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest
@@ -9308,7 +9309,7 @@ def setup_stripe_customer_payments_setup_post(
93089309
_content_type: Optional[StrictStr] = None,
93099310
_headers: Optional[Dict[StrictStr, Any]] = None,
93109311
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9311-
) -> object:
9312+
) -> SetupUserResponse:
93129313
"""Setup Stripe Customer
93139314
93149315
@@ -9342,7 +9343,7 @@ def setup_stripe_customer_payments_setup_post(
93429343
)
93439344

93449345
_response_types_map: Dict[str, Optional[str]] = {
9345-
'200': "object",
9346+
'200': "SetupUserResponse",
93469347
}
93479348
response_data = self.api_client.call_api(
93489349
*_param,
@@ -9370,7 +9371,7 @@ def setup_stripe_customer_payments_setup_post_with_http_info(
93709371
_content_type: Optional[StrictStr] = None,
93719372
_headers: Optional[Dict[StrictStr, Any]] = None,
93729373
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
9373-
) -> ApiResponse[object]:
9374+
) -> ApiResponse[SetupUserResponse]:
93749375
"""Setup Stripe Customer
93759376
93769377
@@ -9404,7 +9405,7 @@ def setup_stripe_customer_payments_setup_post_with_http_info(
94049405
)
94059406

94069407
_response_types_map: Dict[str, Optional[str]] = {
9407-
'200': "object",
9408+
'200': "SetupUserResponse",
94089409
}
94099410
response_data = self.api_client.call_api(
94109411
*_param,
@@ -9466,7 +9467,7 @@ def setup_stripe_customer_payments_setup_post_without_preload_content(
94669467
)
94679468

94689469
_response_types_map: Dict[str, Optional[str]] = {
9469-
'200': "object",
9470+
'200': "SetupUserResponse",
94709471
}
94719472
response_data = self.api_client.call_api(
94729473
*_param,

platform_api_python_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'OpenAPI-Generator/4.0.3/python'
93+
self.user_agent = 'OpenAPI-Generator/4.0.9/python'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

platform_api_python_client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def to_debug_report(self):
392392
"OS: {env}\n"\
393393
"Python Version: {pyversion}\n"\
394394
"Version of the API: 0.1.0\n"\
395-
"SDK Package Version: 4.0.3".\
395+
"SDK Package Version: 4.0.9".\
396396
format(env=sys.platform, pyversion=sys.version)
397397

398398
def get_host_settings(self):

platform_api_python_client/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
from platform_api_python_client.models.pod_status import PodStatus
7070
from platform_api_python_client.models.prebuilt_image_response import PrebuiltImageResponse
7171
from platform_api_python_client.models.service_status import ServiceStatus
72+
from platform_api_python_client.models.setup_user_response import SetupUserResponse
7273
from platform_api_python_client.models.ticket_category import TicketCategory
7374
from platform_api_python_client.models.ticket_priority import TicketPriority
7475
from platform_api_python_client.models.update_autocharge_preferences_request import UpdateAutochargePreferencesRequest
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# coding: utf-8
2+
3+
"""
4+
Platform External API
5+
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7+
8+
The version of the OpenAPI document: 0.1.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501
13+
14+
15+
from __future__ import annotations
16+
import pprint
17+
import re # noqa: F401
18+
import json
19+
20+
from pydantic import BaseModel, ConfigDict, StrictStr
21+
from typing import Any, ClassVar, Dict, List, Optional
22+
from typing import Optional, Set
23+
from typing_extensions import Self
24+
25+
class SetupUserResponse(BaseModel):
26+
"""
27+
SetupUserResponse
28+
""" # noqa: E501
29+
created_workos_organization_id: Optional[StrictStr]
30+
__properties: ClassVar[List[str]] = ["created_workos_organization_id"]
31+
32+
model_config = ConfigDict(
33+
populate_by_name=True,
34+
validate_assignment=True,
35+
protected_namespaces=(),
36+
)
37+
38+
39+
def to_str(self) -> str:
40+
"""Returns the string representation of the model using alias"""
41+
return pprint.pformat(self.model_dump(by_alias=True))
42+
43+
def to_json(self) -> str:
44+
"""Returns the JSON representation of the model using alias"""
45+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46+
return json.dumps(self.to_dict())
47+
48+
@classmethod
49+
def from_json(cls, json_str: str) -> Optional[Self]:
50+
"""Create an instance of SetupUserResponse from a JSON string"""
51+
return cls.from_dict(json.loads(json_str))
52+
53+
def to_dict(self) -> Dict[str, Any]:
54+
"""Return the dictionary representation of the model using alias.
55+
56+
This has the following differences from calling pydantic's
57+
`self.model_dump(by_alias=True)`:
58+
59+
* `None` is only added to the output dict for nullable fields that
60+
were set at model initialization. Other fields with value `None`
61+
are ignored.
62+
"""
63+
excluded_fields: Set[str] = set([
64+
])
65+
66+
_dict = self.model_dump(
67+
by_alias=True,
68+
exclude=excluded_fields,
69+
exclude_none=True,
70+
)
71+
# set to None if created_workos_organization_id (nullable) is None
72+
# and model_fields_set contains the field
73+
if self.created_workos_organization_id is None and "created_workos_organization_id" in self.model_fields_set:
74+
_dict['created_workos_organization_id'] = None
75+
76+
return _dict
77+
78+
@classmethod
79+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80+
"""Create an instance of SetupUserResponse from a dict"""
81+
if obj is None:
82+
return None
83+
84+
if not isinstance(obj, dict):
85+
return cls.model_validate(obj)
86+
87+
_obj = cls.model_validate({
88+
"created_workos_organization_id": obj.get("created_workos_organization_id")
89+
})
90+
return _obj
91+
92+

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "platform_api_python_client"
3-
version = "4.0.3"
3+
version = "4.0.9"
44
description = "Platform External API"
55
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
66
license = "NoLicense"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "platform-api-python-client"
24-
VERSION = "4.0.3"
24+
VERSION = "4.0.9"
2525
PYTHON_REQUIRES = ">= 3.8"
2626
REQUIRES = [
2727
"urllib3 >= 1.25.3, < 3.0.0",

test/test_setup_user_response.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# coding: utf-8
2+
3+
"""
4+
Platform External API
5+
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7+
8+
The version of the OpenAPI document: 0.1.0
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501
13+
14+
15+
import unittest
16+
17+
from platform_api_python_client.models.setup_user_response import SetupUserResponse
18+
19+
class TestSetupUserResponse(unittest.TestCase):
20+
"""SetupUserResponse unit test stubs"""
21+
22+
def setUp(self):
23+
pass
24+
25+
def tearDown(self):
26+
pass
27+
28+
def make_instance(self, include_optional) -> SetupUserResponse:
29+
"""Test SetupUserResponse
30+
include_optional is a boolean, when False only required
31+
params are included, when True both required and
32+
optional params are included """
33+
# uncomment below to create an instance of `SetupUserResponse`
34+
"""
35+
model = SetupUserResponse()
36+
if include_optional:
37+
return SetupUserResponse(
38+
created_workos_organization_id = ''
39+
)
40+
else:
41+
return SetupUserResponse(
42+
created_workos_organization_id = '',
43+
)
44+
"""
45+
46+
def testSetupUserResponse(self):
47+
"""Test SetupUserResponse"""
48+
# inst_req_only = self.make_instance(include_optional=False)
49+
# inst_req_and_optional = self.make_instance(include_optional=True)
50+
51+
if __name__ == '__main__':
52+
unittest.main()

0 commit comments

Comments
 (0)