Skip to content

Commit 721eb85

Browse files
minor docstring updates
1 parent 88fcfbe commit 721eb85

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_phone_numbers_client.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,22 +450,21 @@ def list_reservations(
450450
@distributed_trace
451451
def create_or_update_reservation(
452452
self, *,
453-
reservation_id: str = None,
453+
reservation_id: str,
454454
numbers_to_add: Optional[List[AvailablePhoneNumber]] = None,
455455
numbers_to_remove: Optional[List[str]] = None,
456456
**kwargs: Any
457457
) -> PhoneNumbersReservation:
458458
"""Creates or updates a reservation by its ID.
459459
460460
Updates the reservation with the given ID if it exists; or creates a new one otherwise.
461-
If no ID is provided, a new reservation will be created with a new random ID.
462-
Note that to update an existing reservation, a valid existing ID is required. The response will be the
463-
updated state of the reservation. Updating a reservation will extend the expiration time of
464-
the reservation to 15 minutes after the last change, up to a maximum of 2 hours from creation time.
461+
The response will be the updated state of the reservation.
462+
Updating a reservation will extend the expiration time of the reservation to 15 minutes
463+
after the last change, up to a maximum of 2 hours from creation time.
465464
Partial success is possible, in which case the result will contain phone numbers with error status.
466465
467466
468-
:keyword reservation_id: The ID of the reservation. It must be a valid UUID. If a reservatioin,
467+
:keyword reservation_id: The ID of the reservation. It must be a valid UUID. If a reservation,
469468
with that ID exists it will be updated; ortherwise a new reservation will be created.
470469
:paramtype reservation_id: str
471470
:keyword numbers_to_add: List of phone numbers to add to the reservation.
@@ -527,6 +526,10 @@ def begin_purchase_reservation(
527526
the phone numbers in the reservation is from a country where reselling is not permitted, do not
528527
resell agreement is required.
529528
529+
The agreement to not resell is a legal requirement in some countries in order to purchase phone numbers.
530+
For more information on which countries require this agreement, please refer to this documentation:
531+
https://learn.microsoft.com/azure/communication-services/concepts/numbers/sub-eligibility-number-capability
532+
530533
:param reservation_id: The id of the reservation. Required.
531534
:type reservation_id: str
532535
:keyword agree_to_not_resell: The agreement to not resell the phone numbers. Defaults to False if

sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/aio/_phone_numbers_client_async.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,14 +466,13 @@ async def create_or_update_reservation(
466466
"""Creates or updates a reservation by its ID.
467467
468468
Updates the reservation with the given ID if it exists; or creates a new one otherwise.
469-
If no ID is provided, a new reservation will be created with a new random ID.
470-
Note that to update an existing reservation, a valid existing ID is required. The response will be the
471-
updated state of the reservation. Updating a reservation will extend the expiration time of
472-
the reservation to 15 minutes after the last change, up to a maximum of 2 hours from creation time.
469+
The response will be the updated state of the reservation.
470+
Updating a reservation will extend the expiration time of the reservation to 15 minutes
471+
after the last change, up to a maximum of 2 hours from creation time.
473472
Partial success is possible, in which case the result will contain phone numbers with error status.
474473
475474
476-
:keyword reservation_id: The ID of the reservation. It must be a valid UUID. If a reservatioin,
475+
:keyword reservation_id: The ID of the reservation. It must be a valid UUID. If a reservation,
477476
with that ID exists it will be updated; ortherwise a new reservation will be created.
478477
:keyword numbers_to_add: List of phone numbers to add to the reservation.
479478
:paramtype numbers_to_add: list[~azure.communication.phonenumbers.AvailablePhoneNumber]
@@ -535,6 +534,10 @@ async def begin_purchase_reservation(
535534
Purchase can only be started for active reservations that at least one phone number. If any of
536535
the phone numbers in the reservation is from a country where reselling is not permitted, do not
537536
resell agreement is required.
537+
538+
The agreement to not resell is a legal requirement in some countries in order to purchase phone numbers.
539+
For more information on which countries require this agreement, please refer to this documentation:
540+
https://learn.microsoft.com/azure/communication-services/concepts/numbers/sub-eligibility-number-capability
538541
539542
:param reservation_id: The id of the reservation. Required.
540543
:type reservation_id: str

0 commit comments

Comments
 (0)