-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add static init file to iam domain (#813)
- Loading branch information
1 parent
74b506e
commit 3eacd66
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from warnings import warn | ||
|
||
from twilio.rest.iam.IamBase import IamBase | ||
from twilio.rest.iam.v1.api_key import ApiKeyList | ||
from twilio.rest.iam.v1.get_api_keys import GetApiKeysList | ||
from twilio.rest.iam.v1.new_api_key import NewApiKeyList | ||
|
||
|
||
class Accounts(IamBase): | ||
@property | ||
def api_key(self) -> ApiKeyList: | ||
warn( | ||
"api_key is deprecated. Use v1.api_key instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.api_key | ||
|
||
@property | ||
def get_api_keys(self) -> GetApiKeysList: | ||
warn( | ||
"get_api_keys is deprecated. Use v1.get_api_keys instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.get_api_keys | ||
|
||
@property | ||
def new_api_key(self) -> NewApiKeyList: | ||
warn( | ||
"new_api_key is deprecated. Use v1.new_api_key instead.", | ||
DeprecationWarning, | ||
stacklevel=2, | ||
) | ||
return self.v1.new_api_key |