8000 [Librarian] Regenerated @ a412066ed53a791734369f33f4b2f579662850b3 e4… · skaarlcooper/twilio-python@bd426ae · GitHub
[go: up one dir, main page]

Skip to content

Commit bd426ae

Browse files
committed
[Librarian] Regenerated @ a412066ed53a791734369f33f4b2f579662850b3 e43180215d9b6a7f705d187446184940bb3dfac1
1 parent 35bc174 commit bd426ae

File tree

4 files changed

+45
-43
lines changed

4 files changed

+45
-43
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6+
[2024-07-02] Version 9.2.3
7+
--------------------------
8+
**Intelligence**
9+
- Deprecate account flag api.twilio-intelligence.v2
10+
11+
612
[2024-06-27] Version 9.2.2
713
--------------------------
814
**Api**

twilio/rest/content/v1/content/approval_fetch.py

Lines changed: 18 additions & 14 deletions
8000
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ApprovalFetchInstance(InstanceResource):
2727
:ivar url: The URL of the resource, relative to `https://content.twilio.com`.
2828
"""
2929

30-
def __init__(self, version: Version, payload: Dict[str, Any], sid: str):
30+
def __init__(self, version: Version, payload: Dict[str, Any], content_sid: str):
3131
super().__init__(version)
3232

3333
self.sid: Optional[str] = payload.get("sid")
@@ -36,7 +36,7 @@ def __init__(self, version: Version, payload: Dict[str, Any], sid: str):
3636
self.url: Optional[str] = payload.get("url")
3737

3838
self._solution = {
39-
"sid": sid,
39+
"content_sid": content_sid,
4040
}
4141
self._context: Optional[ApprovalFetchContext] = None
4242

@@ -51,7 +51,7 @@ def _proxy(self) -> "ApprovalFetchContext":
5151
if self._context is None:
5252
self._context = ApprovalFetchContext(
5353
self._version,
54-
sid=self._solution["sid"],
54+
content_sid=self._solution["content_sid"],
5555
)
5656
return self._context
5757

@@ -85,20 +85,20 @@ def __repr__(self) -> str:
8585

8686
class ApprovalFetchContext(InstanceContext):
8787

88-
def __init__(self, version: Version, sid: str):
88+
def __init__(self, version: Version, content_sid: str):
8989
"""
9090
Initialize the ApprovalFetchContext
9191
9292
:param version: Version that contains the resource
93-
:param sid: The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
93+
:param content_sid: The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
9494
"""
9595
super().__init__(version)
9696

9797
# Path Solution
9898
self._solution = {
99-
"sid": sid,
99+
"content_sid": content_sid,
100100
}
101-
self._uri = "/Content/{sid}/ApprovalRequests".format(**self._solution)
101+
self._uri = "/Content/{content_sid}/ApprovalRequests".format(**self._solution)
102102

103103
def fetch(self) -> ApprovalFetchInstance:
104104
"""
@@ -116,7 +116,7 @@ def fetch(self) -> ApprovalFetchInstance:
116116
return ApprovalFetchInstance(
117117
self._version,
118118
payload,
119-
sid=self._solution["sid"],
119+
content_sid=self._solution["content_sid"],
120120
)
121121

122122
async def fetch_async(self) -> ApprovalFetchInstance:
@@ -135,7 +135,7 @@ async def fetch_async(self) -> ApprovalFetchInstance:
135135
return ApprovalFetchInstance(
136136
self._version,
137137
payload,
138-
sid=self._solution["sid"],
138+
content_sid=self._solution["content_sid"],
139139
)
140140

141141
def __repr__(self) -> str:
@@ -150,34 +150,38 @@ def __repr__(self) -> str:
150150

151151
class ApprovalFetchList(ListResource):
152152

153-
def __init__(self, version: Version, sid: str):
153+
def __init__(self, version: Version, content_sid: str):
154154
"""
155155
Initialize the ApprovalFetchList
156156
157157
:param version: Version that contains the resource
158-
:param sid: The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
158+
:param content_sid: The Twilio-provided string that uniquely identifies the Content resource whose approval information to fetch.
159159
160160
"""
161161
super().__init__(version)
162162

163163
# Path Solution
164164
self._solution = {
165-
"sid": sid,
165+
"content_sid": content_sid,
166166
}
167167

168168
def get(self) -> ApprovalFetchContext:
169169
"""
170170
Constructs a ApprovalFetchContext
171171
172172
"""
173-
return ApprovalFetchContext(self._version, sid=self._solution["sid"])
173+
return ApprovalFetchContext(
174+
self._version, content_sid=self._solution["content_sid"]
175+
)
174176

175177
def __call__(self) -> ApprovalFetchContext:
176178
"""
177179
Constructs a ApprovalFetchContext
178180
179181
"""
180-
return ApprovalFetchContext(self._version, sid=self._solution["sid"])
182+
return ApprovalFetchContext(
183+
self._version, content_sid=self._solution["content_sid"]
184+
)
181185

182186
def __repr__(self) -> str:
183187
"""

twilio/rest/numbers/v1/__init__.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@
2828
from twilio.rest.numbers.v1.porting_webhook_configuration_delete import (
2929
PortingWebhookConfigurationDeleteList,
3030
)
31-
from twilio.rest.numbers.v1.porting_webhook_configuration_fetch import (
32-
PortingWebhookConfigurationFetchList,
33-
)
3431
from twilio.rest.numbers.v1.signing_request_configuration import (
3532
SigningRequestConfigurationList,
3633
)
34+
from twilio.rest.numbers.v1.webhook import WebhookList
3735

3836

3937
class V1(Version):
@@ -58,12 +56,10 @@ def __init__(self, domain: Domain):
5856
self._porting_webhook_configurations_delete: Optional[
5957
PortingWebhookConfigurationDeleteList
6058
] = None
61-
self._porting_webhook_configuration_fetch: Optional[
62-
PortingWebhookConfigurationFetchList
63-
] = None
6459
self._signing_request_configurations: Optional[
6560
SigningRequestConfigurationList
6661
] = None
62+
self._webhook: Optional[WebhookList] = None
6763

6864
@property
6965
def bulk_eligibilities(self) -> BulkEligibilityList:
@@ -111,22 +107,18 @@ def porting_webhook_configurations_delete(
111107
)
112108
return self._porting_webhook_configurations_delete
113109

114-
@property
115-
def porting_webhook_configuration_fetch(
116-
self,
117-
) -> PortingWebhookConfigurationFetchList:
118-
if self._porting_webhook_configuration_fetch is None:
119-
self._porting_webhook_configuration_fetch = (
120-
PortingWebhookConfigurationFetchList(self)
121-
)
122-
return self._porting_webhook_configuration_fetch
123-
124110
@property
125111
def signing_request_configurations(self) -> SigningRequestConfigurationList:
126112
if self._signing_request_configurations is None:
127113
self._signing_request_configurations = SigningRequestConfigurationList(self)
128114
return self._signing_request_configurations
129115

116+
@property
117+
def webhook(self) -> WebhookList:
118+
if self._webhook is None:
119+
self._webhook = WebhookList(self)
120+
return self._webhook
121+
130122
def __repr__(self) -> str:
131123
"""
132124
Provide a friendly representation

twilio/rest/numbers/v1/porting_webhook_configuration_fetch.py renamed to twilio/rest/numbers/v1/webhook.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from twilio.base.version import Version
2222

2323

24-
class PortingWebhookConfigurationFetchInstance(InstanceResource):
24+
class WebhookInstance(InstanceResource):
2525
"""
2626
:ivar url: The URL of the webhook configuration request
2727
:ivar port_in_target_url: Webhook URL to send a request when a port in request or port in phone number event happens
@@ -52,14 +52,14 @@ def __repr__(self) -> str:
5252
:returns: Machine friendly representation
5353
"""
5454

55-
return "<Twilio.Numbers.V1.PortingWebhookConfigurationFetchInstance>"
55+
return "<Twilio.Numbers.V1.WebhookInstance>"
5656

5757

58-
class PortingWebhookConfigurationFetchList(ListResource):
58+
class WebhookList(ListResource):
5959

6060
def __init__(self, version: Version):
6161
"""
62-
Initialize the PortingWebhookConfigurationFetchList
62+
Initialize the WebhookList
6363
6464
:param version: Version that contains the resource
6565
@@ -68,38 +68,38 @@ def __init__(self, version: Version):
6868

6969
self._uri = "/Porting/Configuration/Webhook"
7070

71-
def fetch(self) -> PortingWebhookConfigurationFetchInstance:
71+
def fetch(self) -> WebhookInstance:
7272
"""
73-
Asynchronously fetch the PortingWebhookConfigurationFetchInstance
73+
Asynchronously fetch the WebhookInstance
7474
7575
76-
:returns: The fetched PortingWebhookConfigurationFetchInstance
76+
:returns: The fetched WebhookInstance
7777
"""
7878
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
7979

8080
payload = self._version.fetch(method="GET", uri=self._uri, headers=headers)
8181

82-
return PortingWebhookConfigurationFetchInstance(self._version, payload)
82+
return WebhookInstance(self._version, payload)
8383

84-
async def fetch_async(self) -> PortingWebhookConfigurationFetchInstance:
84+
async def fetch_async(self) -> WebhookInstance:
8585
"""
86-
Asynchronously fetch the PortingWebhookConfigurationFetchInstance
86+
Asynchronously fetch the WebhookInstance
8787
8888
89-
:returns: The fetched PortingWebhookConfigurationFetchInstance
89+
:returns: The fetched WebhookInstance
9090
"""
9191
headers = values.of({"Content-Type": "application/x-www-form-urlencoded"})
9292

9393
payload = await self._version.fetch_async(
9494
method="GET", uri=self._uri, headers=headers
9595
)
9696

97-
return PortingWebhookConfigurationFetchInstance(self._version, payload)
97+
return WebhookInstance(self._version, payload)
9898

9999
def __repr__(self) -> str:
100100
"""
101101
Provide a friendly representation
102102
103103
:returns: Machine friendly representation
104104
"""
105-
return "<Twilio.Numbers.V1.PortingWebhookConfigurationFetchList>"
105+
return "<Twilio.Numbers.V1.WebhookList>"

0 commit comments

Comments
 (0)
0