PhoneNumbersClient.StartPurchaseReservation Method

Definition

Starts a long running operation to purchase all of the phone numbers in the reservation. Purchase can only be started for active reservations that at least one phone number. If any of the phone numbers in the reservation is from a country where reselling is not permitted, do not resell agreement is required.

public virtual Azure.Communication.PhoneNumbers.PurchaseReservationOperation StartPurchaseReservation(Guid reservationId, bool agreeToNotResell = false, System.Threading.CancellationToken cancellationToken = default);
abstract member StartPurchaseReservation : Guid * bool * System.Threading.CancellationToken -> Azure.Communication.PhoneNumbers.PurchaseReservationOperation
override this.StartPurchaseReservation : Guid * bool * System.Threading.CancellationToken -> Azure.Communication.PhoneNumbers.PurchaseReservationOperation
Public Overridable Function StartPurchaseReservation (reservationId As Guid, Optional agreeToNotResell As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As PurchaseReservationOperation

Parameters

reservationId
Guid

The ID of the reservation to purchase.

agreeToNotResell
Boolean

The agreement to not resell the phone numbers. Defaults to false if not provided.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Remarks

The agreement to not resell is a legal requirement in some countries in order to purchase phone numbers. For more information on which countries require this agreement, please refer to this documentation: https://learn.microsoft.com/azure/communication-services/concepts/numbers/sub-eligibility-number-capability

Applies to