Skip to content

Commit e429db0

Browse files
committed
[DEVX-4932] Simplify code by removing unncessary validation.
1 parent 21fc89a commit e429db0

File tree

112 files changed

+0
-560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+0
-560
lines changed

twilio/rest/accounts/v1/credential/public_key.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_context import InstanceContext
1312
from twilio.base.instance_resource import InstanceResource
1413
from twilio.base.list_resource import ListResource
@@ -115,10 +114,6 @@ def get_page(self, target_url):
115114
:returns: Page of PublicKeyInstance
116115
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyPage
117116
"""
118-
resource_url = self._version.absolute_url(self._uri)
119-
if not target_url.startswith(resource_url):
120-
raise TwilioException('Invalid target_url for PublicKeyInstance resource.')
121-
122117
response = self._version.domain.twilio.request(
123118
'GET',
124119
target_url,

twilio/rest/api/v2010/account/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_context import InstanceContext
1312
from twilio.base.instance_resource import InstanceResource
1413
from twilio.base.list_resource import ListResource
@@ -177,10 +176,6 @@ def get_page(self, target_url):
177176
:returns: Page of AccountInstance
178177
:rtype: twilio.rest.api.v2010.account.AccountPage
179178
"""
180-
resource_url = self._version.absolute_url(self._uri)
181-
if not target_url.startswith(resource_url):
182-
raise TwilioException('Invalid target_url for AccountInstance resource.')
183-
184179
response = self._version.domain.twilio.request(
185180
'GET',
186181
target_url,

twilio/rest/api/v2010/account/address/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_context import InstanceContext
1312
from twilio.base.instance_resource import InstanceResource
1413
from twilio.base.list_resource import ListResource
@@ -180,10 +179,6 @@ def get_page(self, target_url):
180179
:returns: Page of AddressInstance
181180
:rtype: twilio.rest.api.v2010.account.address.AddressPage
182181
"""
183-
resource_url = self._version.absolute_url(self._uri)
184-
if not target_url.startswith(resource_url):
185-
raise TwilioException('Invalid target_url for AddressInstance resource.')
186-
187182
response = self._version.domain.twilio.request(
188183
'GET',
189184
target_url,

twilio/rest/api/v2010/account/address/dependent_phone_number.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_resource import InstanceResource
1312
from twilio.base.list_resource import ListResource
1413
from twilio.base.page import Page
@@ -119,10 +118,6 @@ def get_page(self, target_url):
119118
:returns: Page of DependentPhoneNumberInstance
120119
:rtype: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberPage
121120
"""
122-
resource_url = self._version.absolute_url(self._uri)
123-
if not target_url.startswith(resource_url):
124-
raise TwilioException('Invalid target_url for DependentPhoneNumberInstance resource.')
125-
126121
response = self._version.domain.twilio.request(
127122
'GET',
128123
target_url,

twilio/rest/api/v2010/account/application.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_context import InstanceContext
1312
from twilio.base.instance_resource import InstanceResource
1413
from twilio.base.list_resource import ListResource
@@ -184,10 +183,6 @@ def get_page(self, target_url):
184183
:returns: Page of ApplicationInstance
185184
:rtype: twilio.rest.api.v2010.account.application.ApplicationPage
186185
"""
187-
resource_url = self._version.absolute_url(self._uri)
188-
if not target_url.startswith(resource_url):
189-
raise TwilioException('Invalid target_url for ApplicationInstance resource.')
190-
191186
response = self._version.domain.twilio.request(
192187
'GET',
193188
target_url,

twilio/rest/api/v2010/account/authorized_connect_app.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_context import InstanceContext
1312
from twilio.base.instance_resource import InstanceResource
1413
from twilio.base.list_resource import ListResource
@@ -118,10 +117,6 @@ def get_page(self, target_url):
118117
:returns: Page of AuthorizedConnectAppInstance
119118
:rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppPage
120119
"""
121-
resource_url = self._version.absolute_url(self._uri)
122-
if not target_url.startswith(resource_url):
123-
raise TwilioException('Invalid target_url for AuthorizedConnectAppInstance resource.')
124-
125120
response = self._version.domain.twilio.request(
126121
'GET',
127122
target_url,

twilio/rest/api/v2010/account/available_phone_number/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"""
88

99
from twilio.base import values
10-
from twilio.base.exceptions import TwilioException
1110
from twilio.base.instance_context import InstanceContext
1211
from twilio.base.instance_resource import InstanceResource
1312
from twilio.base.list_resource import ListResource
@@ -120,10 +119,6 @@ def get_page(self, target_url):
120119
:returns: Page of AvailablePhoneNumberCountryInstance
121120
:rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryPage
122121
"""
123-
resource_url = self._version.absolute_url(self._uri)
124-
if not target_url.startswith(resource_url):
125-
raise TwilioException('Invalid target_url for AvailablePhoneNumberCountryInstance resource.')
126-
127122
response = self._version.domain.twilio.request(
128123
'GET',
129124
target_url,

twilio/rest/api/v2010/account/available_phone_number/local.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_resource import InstanceResource
1312
from twilio.base.list_resource import ListResource
1413
from twilio.base.page import Page
@@ -240,10 +239,6 @@ def get_page(self, target_url):
240239
:returns: Page of LocalInstance
241240
:rtype: twilio.rest.api.v2010.account.available_phone_number.local.LocalPage
242241
"""
243-
resource_url = self._version.absolute_url(self._uri)
244-
if not target_url.startswith(resource_url):
245-
raise TwilioException('Invalid target_url for LocalInstance resource.')
246-
247242
response = self._version.domain.twilio.request(
248243
'GET',
249244
target_url,

twilio/rest/api/v2010/account/available_phone_number/mobile.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_resource import InstanceResource
1312
from twilio.base.list_resource import ListResource
1413
from twilio.base.page import Page
@@ -240,10 +239,6 @@ def get_page(self, target_url):
240239
:returns: Page of MobileInstance
241240
:rtype: twilio.rest.api.v2010.account.available_phone_number.mobile.MobilePage
242241
"""
243-
resource_url = self._version.absolute_url(self._uri)
244-
if not target_url.startswith(resource_url):
245-
raise TwilioException('Invalid target_url for MobileInstance resource.')
246-
247242
response = self._version.domain.twilio.request(
248243
'GET',
249244
target_url,

twilio/rest/api/v2010/account/available_phone_number/toll_free.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from twilio.base import deserialize
1010
from twilio.base import values
11-
from twilio.base.exceptions import TwilioException
1211
from twilio.base.instance_resource import InstanceResource
1312
from twilio.base.list_resource import ListResource
1413
from twilio.base.page import Page
@@ -240,10 +239,6 @@ def get_page(self, target_url):
240239
:returns: Page of TollFreeInstance
241240
:rtype: twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreePage
242241
"""
243-
resource_url = self._version.absolute_url(self._uri)
244-
if not target_url.startswith(resource_url):
245-
raise TwilioException('Invalid target_url for TollFreeInstance resource.')
246-
247242
response = self._version.domain.twilio.request(
248243
'GET',
249244
target_url,

0 commit comments

Comments
 (0)