From 8f92c5e111121828ef4332f47141d4a54fb14e32 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Wed, 18 Sep 2024 14:25:19 +0530 Subject: [PATCH] chore: add static init file to iam domain --- twilio/rest/iam/__init__.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 twilio/rest/iam/__init__.py diff --git a/twilio/rest/iam/__init__.py b/twilio/rest/iam/__init__.py new file mode 100644 index 000000000..7a7819bcc --- /dev/null +++ b/twilio/rest/iam/__init__.py @@ -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