PhoneNumbersModelFactory.PhoneNumbersReservation Method

Definition

Initializes a new instance of PhoneNumbersReservation.

public static Azure.Communication.PhoneNumbers.PhoneNumbersReservation PhoneNumbersReservation(Guid id = default, DateTimeOffset expiresAt = default, System.Collections.Generic.IDictionary<string,Azure.Communication.PhoneNumbers.AvailablePhoneNumber> phoneNumbers = default, Azure.Communication.PhoneNumbers.ReservationStatus status = default);
static member PhoneNumbersReservation : Guid * DateTimeOffset * System.Collections.Generic.IDictionary<string, Azure.Communication.PhoneNumbers.AvailablePhoneNumber> * Azure.Communication.PhoneNumbers.ReservationStatus -> Azure.Communication.PhoneNumbers.PhoneNumbersReservation
Public Shared Function PhoneNumbersReservation (Optional id As Guid = Nothing, Optional expiresAt As DateTimeOffset = Nothing, Optional phoneNumbers As IDictionary(Of String, AvailablePhoneNumber) = Nothing, Optional status As ReservationStatus = Nothing) As PhoneNumbersReservation

Parameters

id
Guid

The id of the reservation.

expiresAt
DateTimeOffset

The time at which the reservation will expire. If a reservation is not purchased before this time, all of the reserved phone numbers will be released and made available for others to purchase.

phoneNumbers
IDictionary<String,AvailablePhoneNumber>

A dictionary containing the reservation phone numbers. The key is the ID of the phone number (digits only) and values are AvailablePhoneNumber objects. Not populated when retrieving PhoneNumbersReservation collections.

status
ReservationStatus

Represents the status of the reservation. Possible values include: 'active', 'submitted', 'completed', 'expired'.

Returns

A new PhoneNumbersReservation instance for mocking.

Applies to