10000 [Librarian] Regenerated @ 021bab52f93b55d7a5786bd27716bf3a0be2d7b9 aa… · CodeAiModels/twilio-python@726c36a · GitHub
[go: up one dir, main page]

Skip to content

Commit 726c36a

Browse files
committed
[Librarian] Regenerated @ 021bab52f93b55d7a5786bd27716bf3a0be2d7b9 aa81ca7c51512c448626fafb32aeb46838510334
1 parent 7fc68cb commit 726c36a

File tree

14 files changed

+79
-3391
lines changed

14 files changed

+79
-3391
lines changed

CHANGES.md

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

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

6+
[2024-10-03] Version 9.3.3
7+
--------------------------
8+
**Library - Chore**
9+
- [PR #816](https://github.com/twilio/twilio-python/pull/816): add assistants init files. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
10+
11+
**Messaging**
12+
- Add A2P external campaign CnpMigration flag
13+
14+
**Numbers**
15+
- Add address sid to portability API
16+
17+
**Verify**
18+
- Add `SnaClientToken` optional parameter on Verification check.
19+
- Add `EnableSnaClientToken` optional parameter for Verification creation.
20+
21+
622
[2024-09-25] Version 9.3.2
723
--------------------------
824
**Accounts**

twilio/rest/iam/v1/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from twilio.base.domain import Domain
1818
from twilio.rest.iam.v1.api_key import ApiKeyList
1919
from twilio.rest.iam.v1.get_api_keys import GetApiKeysList
20-
from twilio.rest.iam.v1.new_api_key import NewApiKeyList
20+
from twilio.rest.iam.v1.key import KeyList
2121

2222

2323
class V1(Version):
@@ -31,7 +31,7 @@ def __init__(self, domain: Domain):
3131
super().__init__(domain, "v1")
3232
self._api_key: Optional[ApiKeyList] = None
3333
self._get_api_keys: Optional[GetApiKeysList] = None
34-
self._new_api_key: Optional[NewApiKeyList] = None
34+
self._keys: Optional[KeyList] = None
3535

3636
@property
3737
def api_key(self) -> ApiKeyList:
@@ -46,10 +46,10 @@ def get_api_keys(self) -> GetApiKeysList:
4646
return self._get_api_keys
4747

4848
@property
49-
def new_api_key(self) -> NewApiKeyList:
50-
if self._new_api_key is None:
51-
self._new_api_key = NewApiKeyList(self)
52-
return self._new_api_key
49+
def keys(self) -> KeyList:
50+
if self._keys is None:
51+
self._keys = KeyList(self)
52+
return self._keys
5353

5454
def __repr__(self) -> str:
5555
"""

twilio/rest/iam/v1/new_api_key.py renamed to twilio/rest/iam/v1/key.py

Lines changed: 15 additions & 15 deletions
< 10000 td data-grid-cell-id="diff-2bdbcd96940dec83a099500b4914b18bbf994806a6e61467e1f229d6830035a9-92-92-0" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative diff-line-number-neutral left-side">92
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from twilio.base.version import Version
2222

2323

24-
class NewApiKeyInstance(InstanceResource):
24+
class KeyInstance(InstanceResource):
2525

2626
class Keytype(object):
2727
RESTRICTED = "restricted"
@@ -56,14 +56,14 @@ def __repr__(self) -> str:
5656
:returns: Machine friendly representation
5757
"""
5858

59-
return "<Twilio.Iam.V1.NewApiKeyInstance>"
59+
return "<Twilio.Iam.V1.KeyInstance>"
6060

6161

62-
class NewApiKeyList(ListResource):
62+
class KeyList(ListResource):
6363

6464
def __init__(self, version: Version):
6565
"""
66-
Initialize the NewApiKeyList
66+
Initialize the KeyList
6767
6868
:param version: Version that contains the resource
6969
@@ -76,18 +76,18 @@ def create(
7676
self,
7777
account_sid: str,
7878
friendly_name: Union[str, object] = values.unset,
79-
key_type: Union["NewApiKeyInstance.Keytype", object] = values.unset,
79+
key_type: Union["KeyInstance.Keytype", object] = values.unset,
8080
policy: Union[object, object] = values.unset,
81-
) -> NewApiKeyInstance:
81+
) -> KeyInstance:
8282
"""
83-
Create the NewApiKeyInstance
83+
Create the KeyInstance
8484
8585
:param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
8686
:param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
8787
:param key_type:
8888
:param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
8989
90-
:returns: The created NewApiKeyInstance
90+
:returns: The created KeyInstance
9191
"""
92

9393
data = values.of(
@@ -104,24 +104,24 @@ def create(
104104
method="POST", uri=self._uri, data=data, headers=headers
105105
)
106106

107-
return NewApiKeyInstance(self._version, payload)
107+
return KeyInstance(self._version, payload)
108108

109109
async def create_async(
110110
self,
111111
account_sid: str,
112112
friendly_name: Union[str, object] = values.unset,
113-
key_type: Union["NewApiKeyInstance.Keytype", object] = values.unset,
113+
key_type: Union["KeyInstance.Keytype", object] = values.unset,
114114
policy: Union[object, object] = values.unset,
115-
) -> NewApiKeyInstance:
115+
) -> KeyInstance:
116116
"""
117-
Asynchronously create the NewApiKeyInstance
117+
Asynchronously create the KeyInstance
118118
119119
:param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource.
120120
:param friendly_name: A descriptive string that you create to describe the resource. It can be up to 64 characters long.
121121
:param key_type:
122122
:param policy: The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys).
123123
124-
:returns: The created NewApiKeyInstance
124+
:returns: The created KeyInstance
125125
"""
126126

127127
data = values.of(
@@ -138,12 +138,12 @@ async def create_async(
138138
method="POST", uri=self._uri, data=data, headers=headers
139139
)
140140

141-
return NewApiKeyInstance(self._version, payload)
141+
return KeyInstance(self._version, payload)
142142

143143
def __repr__(self) -> str:
144144
"""
145145
Provide a friendly representation
146146
147147
:returns: Machine friendly representation
148148
"""
149-
return "<Twilio.Iam.V1.NewApiKeyList>"
149+
return "<Twilio.Iam.V1.KeyList>"

twilio/rest/numbers/v1/porting_portability.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,31 +85,39 @@ def _proxy(self) -> "PortingPortabilityContext":
8585
return self._context
8686

8787
def fetch(
88-
self, target_account_sid: Union[str, object] = values.unset
88+
self,
89+
target_account_sid: Union[str, object] = values.unset,
90+
address_sid: Union[str, object] = values.unset,
8991
) -> "PortingPortabilityInstance":
9092
"""
9193
Fetch the PortingPortabilityInstance
9294
9395
:param target_account_sid: Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account.
96+
:param address_sid: Address Sid of customer to which the number will be ported.
9497
9598
:returns: The fetched PortingPortabilityInstance
9699
"""
97100
return self._proxy.fetch(
98101
target_account_sid=target_account_sid,
102+
address_sid=address_sid,
99103
)
100104

101105
async def fetch_async(
102-
self, target_account_sid: Union[str, object] = values.unset
106+
self,
107+
target_account_sid: Union[str, object] = values.unset,
108+
address_sid: Union[str, object] = values.unset,
103109
) -> "PortingPortabilityInstance":
104110
"""
105111
Asynchronous coroutine to fetch the PortingPortabilityInstance
106112
107113
:param target_account_sid: Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account.
114+
:param address_sid: Address Sid of customer to which the number will be ported.
108115
109116
:returns: The fetched PortingPortabilityInstance
110117
"""
111118
return await self._proxy.fetch_async(
112119
target_account_sid=target_account_sid,
120+
address_sid=address_sid,
113121
)
114122

115123
def __repr__(self) -> str:
@@ -142,19 +150,23 @@ def __init__(self, version: Version, phone_number: str):
142150
)
143151

144152
def fetch(
145-
self, target_account_sid: Union[str, object] = values.unset
153+
self,
154+
target_account_sid: Union[str, object] = values.unset,
155+
address_sid: Union[str, object] = values.unset,
146156
) -> PortingPortabilityInstance:
147157
"""
148158
Fetch the PortingPortabilityInstance
149159
150160
:param target_account_sid: Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account.
161+
:param address_sid: Address Sid of customer to which the number will be ported.
151162
152163
:returns: The fetched PortingPortabilityInstance
153164
"""
154165

155166
data = values.of(
156167
{
157168
"TargetAccountSid": target_account_sid,
169+
"AddressSid": address_sid,
158170
}
159171
)
160172

@@ -167,19 +179,23 @@ def fetch(
167179
)
168180

169181
async def fetch_async(
170-
self, target_account_sid: Union[str, object] = values.unset
182+
self,
183+
target_account_sid: Union[str, object] = values.unset,
184+
address_sid: Union[str, object] = values.unset,
171185
) -> PortingPortabilityInstance:
172186
"""
173187
Asynchronous coroutine to fetch the PortingPortabilityInstance
174188
175189
:param target_account_sid: Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account.
190+
:param address_sid: Address Sid of customer to which the number will be ported.
176191
177192
:returns: The fetched PortingPortabilityInstance
178193
"""
179194

180195
data = values.of(
181196
{
182197
"TargetAccountSid": target_account_sid,
198+
"AddressSid": address_sid,
183199
}
184200
)
185201

twilio/rest/preview/PreviewBase.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from twilio.base.domain import Domain
1515
from twilio.rest import Client
16-
from twilio.rest.preview.deployed_devices import DeployedDevices
1716
from twilio.rest.preview.hosted_numbers import HostedNumbers
1817
from twilio.rest.preview.sync import Sync
1918
from twilio.rest.preview.marketplace import Marketplace
@@ -29,21 +28,11 @@ def __init__(self, twilio: Client):
2928
:returns: Domain for Preview
3029
"""
3130
super().__init__(twilio, "https://preview.twilio.com")
32-
self._deployed_devices: Optional[DeployedDevices] = None
3331
self._hosted_numbers: Optional[HostedNumbers] = None
3432
self._sync: Optional[Sync] = None
3533
self._marketplace: Optional[Marketplace] = None
3634
self._wireless: Optional[Wireless] = None
3735

38-
@property
39-
def deployed_devices(self) -> DeployedDevices:
40-
"""
41-
:returns: Versions deployed_devices of Preview
42-
"""
43-
if self._deployed_devices is None:
44-
self._deployed_devices = DeployedDevices(self)
45-
return self._deployed_devices
46-
4736
@property
4837
def hosted_numbers(self) -> HostedNumbers:
4938
"""

twilio/rest/preview/deployed_devices/__init__.py

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0