|
1 | | -r""" |
2 | | - This code was generated by |
3 | | - ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ |
4 | | - | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ |
5 | | - | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ |
| 1 | +from twilio.rest.preview_iam.PreviewIamBase import PreviewIamBase |
6 | 2 |
|
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 | +) |
9 | 12 |
|
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 |
35 | 13 |
|
| 14 | +class PreviewIam(PreviewIamBase): |
36 | 15 | @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 |
41 | 18 |
|
42 | 19 | @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 |
47 | 22 |
|
48 | 23 | @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 |
0 commit comments