44# license information.
55# --------------------------------------------------------------------------
66
7+ from typing import TYPE_CHECKING
78from azure .core .tracing .decorator import distributed_trace
89from azure .core .tracing .decorator_async import distributed_trace_async
910from azure .core .paging import ItemPaged
1314from .._shared .utils import parse_connection_str , get_authentication_policy
1415from .._version import SDK_MONIKER
1516
17+ if TYPE_CHECKING :
18+ from typing import Any
19+ from azure .core .credentials_async import AsyncTokenCredential
20+ from azure .core .async_paging import AsyncItemPaged
21+ from azure .core .polling import AsyncLROPoller
22+ from .._generated .models import PhoneNumberSearchResult , PurchasedPhoneNumber , PhoneNumberCapabilities
23+
1624class PhoneNumbersClient (object ):
25+ """A client to interact with the AzureCommunicationService Phone Numbers gateway.
26+
27+ This client provides operations to interact with the phone numbers service
28+ :param str endpoint:
29+ The endpoint url for Azure Communication Service resource.
30+ :param AsyncTokenCredential credential:
31+ The credentials with which to authenticate.
32+ """
1733 def __init__ (
1834 self ,
1935 endpoint , # type: str
20- credential , # type: str
36+ credential , # type: AsyncTokenCredential
2137 ** kwargs # type: Any
2238 ):
2339 # type: (...) -> None
@@ -85,7 +101,7 @@ async def begin_release_phone_number(
85101 ** kwargs # type: Any
86102 ):
87103 # type: (...) -> AsyncLROPoller[None]
88- """Releases an acquired phone number.
104+ """Releases an purchased phone number.
89105
90106 :param phone_number: Phone number to be released, e.g. +11234567890.
91107 :type phone_number: str
@@ -190,9 +206,9 @@ async def get_purchased_phone_number(
190206 ** kwargs # type: Any
191207 ):
192208 # type: (...) -> PurchasedPhoneNumber
193- """Gets the details of the given acquired phone number.
209+ """Gets the details of the given purchased phone number.
194210
195- :param phone_number: The acquired phone number whose details are to be fetched in E.164 format,
211+ :param phone_number: The purchased phone number whose details are to be fetched in E.164 format,
196212 e.g. +11234567890.
197213 :type phone_number: str
198214 :rtype: ~azure.communication.phonenumbers.models.PurchasedPhoneNumber
@@ -207,16 +223,16 @@ def list_purchased_phone_numbers(
207223 self ,
208224 ** kwargs # type: Any
209225 ):
210- # type: (...) -> AsyncItemPaged[AcquiredPhoneNumbers ]
211- """Gets the list of all acquired phone numbers.
226+ # type: (...) -> AsyncItemPaged[PurchasedPhoneNumber ]
227+ """Gets the list of all purchased phone numbers.
212228
213229 :param skip: An optional parameter for how many entries to skip, for pagination purposes. The
214230 default value is 0.
215231 :type skip: int
216232 :param top: An optional parameter for how many entries to return, for pagination purposes. The
217233 default value is 100.
218234 :type top: int
219- :rtype: ~azure.core.paging.AsyncItemPaged[~azure.communication.phonenumbers.models.AcquiredPhoneNumbers ]
235+ :rtype: ~azure.core.paging.AsyncItemPaged[~azure.communication.phonenumbers.models.PurchasedPhoneNumber ]
220236 """
221237 return self ._phone_number_client .phone_numbers .list_phone_numbers (
222238 ** kwargs
0 commit comments