PhoneNumbersModelFactory.PhoneNumberSearchResult 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.
Overloads
PhoneNumberSearchResult(String, IEnumerable<String>, PhoneNumberType, PhoneNumberAssignmentType, PhoneNumberCapabilities, PhoneNumberCost, DateTimeOffset)
- Source:
- PhoneNumbersModelFactory.cs
- Source:
- PhoneNumbersModelFactory.cs
Initializes a new instance of PhoneNumberSearchResult.
public static Azure.Communication.PhoneNumbers.PhoneNumberSearchResult PhoneNumberSearchResult (string searchId, System.Collections.Generic.IEnumerable<string> phoneNumbers, Azure.Communication.PhoneNumbers.PhoneNumberType phoneNumberType, Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType assignmentType, Azure.Communication.PhoneNumbers.PhoneNumberCapabilities capabilities, Azure.Communication.PhoneNumbers.PhoneNumberCost cost, DateTimeOffset searchExpiresOn);
static member PhoneNumberSearchResult : string * seq<string> * Azure.Communication.PhoneNumbers.PhoneNumberType * Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType * Azure.Communication.PhoneNumbers.PhoneNumberCapabilities * Azure.Communication.PhoneNumbers.PhoneNumberCost * DateTimeOffset -> Azure.Communication.PhoneNumbers.PhoneNumberSearchResult
Public Shared Function PhoneNumberSearchResult (searchId As String, phoneNumbers As IEnumerable(Of String), phoneNumberType As PhoneNumberType, assignmentType As PhoneNumberAssignmentType, capabilities As PhoneNumberCapabilities, cost As PhoneNumberCost, searchExpiresOn As DateTimeOffset) As PhoneNumberSearchResult
Parameters
- searchId
- String
The search id.
- phoneNumbers
- IEnumerable<String>
The phone numbers that are available. Can be fewer than the desired search quantity.
- phoneNumberType
- PhoneNumberType
The phone number's type, e.g. geographic, or tollFree.
- assignmentType
- PhoneNumberAssignmentType
Phone number's assignment type.
- capabilities
- PhoneNumberCapabilities
Capabilities of a phone number.
- cost
- PhoneNumberCost
The incurred cost for a single phone number.
- searchExpiresOn
- DateTimeOffset
The date that this search result expires and phone numbers are no longer on hold. A search result expires in less than 15min, e.g. 2020-11-19T16:31:49.048Z.
Returns
Exceptions
searchId
, phoneNumbers
, capabilities
, or cost
is null.
Applies to
PhoneNumberSearchResult(String, IEnumerable<String>, PhoneNumberType, PhoneNumberAssignmentType, PhoneNumberCapabilities, PhoneNumberCost, DateTimeOffset, Nullable<Int32>, Nullable<PhoneNumberSearchResultError>)
- Source:
- PhoneNumbersModelFactory.cs
- Source:
- PhoneNumbersModelFactory.cs
Initializes a new instance of PhoneNumberSearchResult.
public static Azure.Communication.PhoneNumbers.PhoneNumberSearchResult PhoneNumberSearchResult (string searchId = default, System.Collections.Generic.IEnumerable<string> phoneNumbers = default, Azure.Communication.PhoneNumbers.PhoneNumberType phoneNumberType = default, Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType assignmentType = default, Azure.Communication.PhoneNumbers.PhoneNumberCapabilities capabilities = default, Azure.Communication.PhoneNumbers.PhoneNumberCost cost = default, DateTimeOffset searchExpiresOn = default, int? errorCode = default, Azure.Communication.PhoneNumbers.PhoneNumberSearchResultError? error = default);
static member PhoneNumberSearchResult : string * seq<string> * Azure.Communication.PhoneNumbers.PhoneNumberType * Azure.Communication.PhoneNumbers.PhoneNumberAssignmentType * Azure.Communication.PhoneNumbers.PhoneNumberCapabilities * Azure.Communication.PhoneNumbers.PhoneNumberCost * DateTimeOffset * Nullable<int> * Nullable<Azure.Communication.PhoneNumbers.PhoneNumberSearchResultError> -> Azure.Communication.PhoneNumbers.PhoneNumberSearchResult
Public Shared Function PhoneNumberSearchResult (Optional searchId As String = Nothing, Optional phoneNumbers As IEnumerable(Of String) = Nothing, Optional phoneNumberType As PhoneNumberType = Nothing, Optional assignmentType As PhoneNumberAssignmentType = Nothing, Optional capabilities As PhoneNumberCapabilities = Nothing, Optional cost As PhoneNumberCost = Nothing, Optional searchExpiresOn As DateTimeOffset = Nothing, Optional errorCode As Nullable(Of Integer) = Nothing, Optional error As Nullable(Of PhoneNumberSearchResultError) = Nothing) As PhoneNumberSearchResult
Parameters
- searchId
- String
The search id.
- phoneNumbers
- IEnumerable<String>
The phone numbers that are available. Can be fewer than the desired search quantity.
- phoneNumberType
- PhoneNumberType
The phone number's type, e.g. geographic, or tollFree.
- assignmentType
- PhoneNumberAssignmentType
Phone number's assignment type.
- capabilities
- PhoneNumberCapabilities
Capabilities of a phone number.
- cost
- PhoneNumberCost
The incurred cost for a single phone number.
- searchExpiresOn
- DateTimeOffset
The date that this search result expires and phone numbers are no longer on hold. A search result expires in less than 15min, e.g. 2020-11-19T16:31:49.048Z.
Mapping Error Messages to Codes.
Returns
A new PhoneNumberSearchResult instance for mocking.
Applies to
Azure SDK for .NET