Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix orgs api changes #826

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 17 additions & 51 deletions twilio/rest/preview_iam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,59 +1,25 @@
r"""
This code was generated by
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
from twilio.rest.preview_iam.PreviewIamBase import PreviewIamBase

Organization Public API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
from twilio.rest.preview_iam.v1.authorize import (
AuthorizeList,
)
from twilio.rest.preview_iam.v1.token import (
TokenList,
)
from twilio.rest.preview_iam.versionless.organization import (
OrganizationList,
)

NOTE: This class is auto generated by OpenAPI Generator.
https://openapi-generator.tech
Do not edit the class manually.
"""

from typing import Optional
from twilio.base.version import Version
from twilio.base.domain import Domain
from twilio.rest.preview_iam.organizations.account import AccountList
from twilio.rest.preview_iam.organizations.role_assignment import RoleAssignmentList
from twilio.rest.preview_iam.organizations.user import UserList


class Organizations(Version):

def __init__(self, domain: Domain):
"""
Initialize the Organizations version of PreviewIam
:param domain: The Twilio.preview_iam domain
"""
super().__init__(domain, "Organizations")
self._accounts: Optional[AccountList] = None
self._role_assignments: Optional[RoleAssignmentList] = None
self._users: Optional[UserList] = None

class PreviewIam(PreviewIamBase):
@property
def accounts(self) -> AccountList:
if self._accounts is None:
self._accounts = AccountList(self)
return self._accounts
def organization(self) -> OrganizationList:
return self.versionless.organization

@property
def role_assignments(self) -> RoleAssignmentList:
if self._role_assignments is None:
self._role_assignments = RoleAssignmentList(self)
return self._role_assignments
def authorize(self) -> AuthorizeList:
return self.v1.authorize

@property
def users(self) -> UserList:
if self._users is None:
self._users = UserList(self)
return self._users

def __repr__(self) -> str:
"""
Provide a friendly representation
:returns: Machine friendly representation
"""
return "<Twilio.PreviewIam.Organizations>"
def token(self) -> TokenList:
return self.v1.token
59 changes: 0 additions & 59 deletions twilio/rest/preview_iam/organizations/__init__.py

This file was deleted.

Loading
Loading