PhoneNumbersClient.StartPurchaseReservationAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchaseReservationOperation> StartPurchaseReservationAsync(Guid reservationId, bool agreeToNotResell = false, System.Threading.CancellationToken cancellationToken = default);
abstract member StartPurchaseReservationAsync : Guid * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchaseReservationOperation>
override this.StartPurchaseReservationAsync : Guid * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Communication.PhoneNumbers.PurchaseReservationOperation>
Public Overridable Function StartPurchaseReservationAsync (reservationId As Guid, Optional agreeToNotResell As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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