From 129d389afe0239b92112ab24884a3f21cec62fd4 Mon Sep 17 00:00:00 2001 From: Athira Sabu <102021496+AsabuHere@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:55:19 +0530 Subject: [PATCH] fix: Orgs api metadata removal for php repo (#812) * Delete src/Twilio/Rest/PreviewIam.php * Delete src/Twilio/Rest/PreviewIamBase.php * Update Client.php to remove preview-iam references --- src/Twilio/Rest/Client.php | 13 ------ src/Twilio/Rest/PreviewIam.php | 5 -- src/Twilio/Rest/PreviewIamBase.php | 75 ------------------------------ 3 files changed, 93 deletions(-) delete mode 100644 src/Twilio/Rest/PreviewIam.php delete mode 100644 src/Twilio/Rest/PreviewIamBase.php diff --git a/src/Twilio/Rest/Client.php b/src/Twilio/Rest/Client.php index 7903778c0..d9bfcd586 100644 --- a/src/Twilio/Rest/Client.php +++ b/src/Twilio/Rest/Client.php @@ -27,7 +27,6 @@ * @property Events $events * @property FlexApi $flexApi * @property FrontlineApi $frontlineApi - * @property PreviewIam $previewIam * @property Insights $insights * @property Intelligence $intelligence * @property IpMessaging $ipMessaging @@ -107,7 +106,6 @@ class Client extends BaseClient { protected $_events; protected $_flexApi; protected $_frontlineApi; - protected $_previewIam; protected $_insights; protected $_intelligence; protected $_ipMessaging; @@ -234,17 +232,6 @@ protected function getFrontlineApi(): FrontlineApi { } return $this->_frontlineApi; } - /** - * Access the PreviewIam Twilio Domain - * - * @return PreviewIam PreviewIam Twilio Domain - */ - protected function getPreviewIam(): PreviewIam { - if (!$this->_previewIam) { - $this->_previewIam = new PreviewIam($this); - } - return $this->_previewIam; - } /** * Access the Insights Twilio Domain * diff --git a/src/Twilio/Rest/PreviewIam.php b/src/Twilio/Rest/PreviewIam.php deleted file mode 100644 index 7f9d78262..000000000 --- a/src/Twilio/Rest/PreviewIam.php +++ /dev/null @@ -1,5 +0,0 @@ -baseUrl = 'https://preview-iam.twilio.com'; - } - - - /** - * Magic getter to lazy load version - * - * @param string $name Version to return - * @return \Twilio\Version The requested version - * @throws TwilioException For unknown versions - */ - public function __get(string $name) { - $method = 'get' . \ucfirst($name); - if (\method_exists($this, $method)) { - return $this->$method(); - } - - throw new TwilioException('Unknown version ' . $name); - } - - /** - * Magic caller to get resource contexts - * - * @param string $name Resource to return - * @param array $arguments Context parameters - * @return \Twilio\InstanceContext The requested resource context - * @throws TwilioException For unknown resource - */ - public function __call(string $name, array $arguments) { - $method = 'context' . \ucfirst($name); - if (\method_exists($this, $method)) { - return \call_user_func_array([$this, $method], $arguments); - } - - throw new TwilioException('Unknown context ' . $name); - } - - /** - * Provide a friendly representation - * - * @return string Machine friendly representation - */ - public function __toString(): string { - return '[Twilio.PreviewIam]'; - } -}