PhoneNumbersModelFactory.AvailablePhoneNumber Method

Definition

Initializes a new instance of AvailablePhoneNumber.

public static Azure.Communication.PhoneNumbers.AvailablePhoneNumber AvailablePhoneNumber(string id = default, string countryCode = default, string phoneNumber = default, Azure.Communication.PhoneNumbers.PhoneNumberCapabilities capabilities = default, Azure.Communication.PhoneNumbers.PhoneNumberType phoneNumberType = default, Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType assignmentType = default, Azure.Communication.PhoneNumbers.PhoneNumberCost cost = default, Azure.Communication.PhoneNumbers.PhoneNumberAvailabilityStatus status = default, bool isAgreementToNotResellRequired = false, Azure.ResponseError error = default);
static member AvailablePhoneNumber : string * string * string * Azure.Communication.PhoneNumbers.PhoneNumberCapabilities * Azure.Communication.PhoneNumbers.PhoneNumberType * Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType * Azure.Communication.PhoneNumbers.PhoneNumberCost * Azure.Communication.PhoneNumbers.PhoneNumberAvailabilityStatus * bool * Azure.ResponseError -> Azure.Communication.PhoneNumbers.AvailablePhoneNumber
Public Shared Function AvailablePhoneNumber (Optional id As String = Nothing, Optional countryCode As String = Nothing, Optional phoneNumber As String = Nothing, Optional capabilities As PhoneNumberCapabilities = Nothing, Optional phoneNumberType As PhoneNumberType = Nothing, Optional assignmentType As PhoneNumberAssignmentType = Nothing, Optional cost As PhoneNumberCost = Nothing, Optional status As PhoneNumberAvailabilityStatus = Nothing, Optional isAgreementToNotResellRequired As Boolean = false, Optional error As ResponseError = Nothing) As AvailablePhoneNumber

Parameters

id
String

The id of the phone number.

countryCode
String

The ISO 3166-2 country code, e.g. US.

phoneNumber
String

The phone number in E.164 format, e.g. +11234567890.

capabilities
PhoneNumberCapabilities

Capabilities of a phone number.

phoneNumberType
PhoneNumberType

Represents the number type of the offering.

assignmentType
PhoneNumberAssignmentType

Represents the assignment type of the offering. Also known as the use case.

cost
PhoneNumberCost

The incurred cost for this phone number.

status
PhoneNumberAvailabilityStatus

Represents the status of the phone number. Possible values include: 'available', 'reserved', 'expired', 'error', 'purchased'.

isAgreementToNotResellRequired
Boolean

Indicates if do not resell agreement is required. If true, the phone number cannot be acquired unless the customer provides explicit agreement to not resell it.

error
ResponseError

Contains error details in case of failure when reserving, releasing or purchasing the phone number. Note that this is ignored by the service when present in requests.

Returns

A new AvailablePhoneNumber instance for mocking.

Applies to