8000 chore: fix orgs api changes (#826) · CoolNightTimeCoder/twilio-python@541b312 · GitHub
[go: up one dir, main page]

Skip to content

Commit 541b312

Browse files
chore: fix orgs api changes (twilio#826)
1 parent e256e92 commit 541b312

File tree

5 files changed

+17
-2186
lines changed

5 files changed

+17
-2186
lines changed

twilio/rest/preview_iam/__init__.py

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,25 @@
1-
r"""
2-
This code was generated by
3-
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4-
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5-
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
1+
from twilio.rest.preview_iam.PreviewIamBase import PreviewIamBase
62

7-
Organization Public API
8-
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
3+
from twilio.rest.preview_iam.v1.authorize import (
4+
AuthorizeList,
5+
)
6+
from twilio.rest.preview_iam.v1.token import (
7+
TokenList,
8+
)
9+
from twilio.rest.preview_iam.versionless.organization import (
10+
OrganizationList,
11+
)
912

10-
NOTE: This class is auto generated by OpenAPI Generator.
11-
https://openapi-generator.tech
12-
Do not edit the class manually.
13-
"""
14-
15-
from typing import Optional
16-
from twilio.base.version import Version
17-
from twilio.base.domain import Domain
18-
from twilio.rest.preview_iam.organizations.account import AccountList
19-
from twilio.rest.preview_iam.organizations.role_assignment import RoleAssignmentList
20-
from twilio.rest.preview_iam.organizations.user import UserList
21-
22-
23-
class Organizations(Version):
24-
25-
def __init__(self, domain: Domain):
26-
"""
27-
Initialize the Organizations version of PreviewIam
28-
29-
:param domain: The Twilio.preview_iam domain
30-
"""
31-
super().__init__(domain, "Organizations")
32-
self._accounts: Optional[AccountList] = None
33-
self._role_assignments: Optional[RoleAssignmentList] = None
34-
self._users: Optional[UserList] = None
3513

14+
class PreviewIam(PreviewIamBase):
3615
@property
37-
def accounts(self) -> AccountList:
38-
if self._accounts is None:
39-
self._accounts = AccountList(self)
40-
return self._accounts
16+
def organization(self) -> OrganizationList:
17+
return self.versionless.organization
4118

4219
@property
43-
def role_assignments(self) -> RoleAssignmentList:
44-
if self._role_assignments is None:
45-
self._role_assignments = RoleAssignmentList(self)
46-
return self._role_assignments
20+
def authorize(self) -> AuthorizeList:
21+
return self.v1.authorize
4722

4823
@property
49-
def users(self) -> UserList:
50-
if self._users is None:
51-
self._users = UserList(self)
52-
return self._users
53-
54-
def __repr__(self) -> str:
55-
"""
56-
Provide a friendly representation
57-
:returns: Machine friendly representation
58-
"""
59-
return "<Twilio.PreviewIam.Organizations>"
24+
def token(self) -> TokenList:
25+
return self.v1.token

twilio/rest/preview_iam/organizations/__init__.py

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0