Class FormatInsights
- Namespace
- Vonage.IdentityInsights.GetInsights
- Assembly
- Vonage.dll
Validates the format of a phone number and provides information based on that format.
public record FormatInsights : IEquatable<FormatInsights>
- Inheritance
-
FormatInsights
- Implements
- Inherited Members
Constructors
FormatInsights(string, string, string, string, string[], string, string, bool, InsightStatus)
Validates the format of a phone number and provides information based on that format.
public FormatInsights(string CountryCode, string CountryName, string CountryPrefix, string OfflineLocation, string[] TimeZones, string NumberInternational, string NumberNational, bool IsFormatValid, InsightStatus Status)
Parameters
CountryCodestringTwo character country code for phone_number. This is in ISO 3166-1 alpha-2 format.
CountryNamestringThe full name of the country where the phone_number is registered.
CountryPrefixstringThe numeric prefix for the country where the phone_number is registered.
OfflineLocationstringThe location where the number was originally assigned, based on its prefix. This does not represent the real-time location of the device. The value indicates the country of origin or, when available, the specific geographical area associated with the number. Only landline and mobile numbers are eligible for offline location data.
TimeZonesstring[]List of time zones corresponding to the format.offline_location field, or a single-element list with the default "unknown" time zone if no other time zone was found or if the number is invalid. Time zone values follow the tz database identifiers.
NumberInternationalstringThe phone_number from your request, formatted in international E.164 format.
NumberNationalstringThe phone_number from your request, formatted according to the local convention of the country it belongs to.
IsFormatValidboolPhone number format validation involves verifying the length and prefix details at various levels to ensure accuracy and compliance with global numbering standards. A valid format means the number can be legitimately assigned by carriers to users. However, it does not guarantee that the number is currently assigned to a carrier or that it is reachable.
StatusInsightStatusIndicates the status of the information returned for the specified phone number.
Properties
CountryCode
Two character country code for phone_number. This is in ISO 3166-1 alpha-2 format.
[JsonPropertyName("country_code")]
public string CountryCode { get; init; }
Property Value
CountryName
The full name of the country where the phone_number is registered.
[JsonPropertyName("country_name")]
public string CountryName { get; init; }
Property Value
CountryPrefix
The numeric prefix for the country where the phone_number is registered.
[JsonPropertyName("country_prefix")]
public string CountryPrefix { get; init; }
Property Value
IsFormatValid
Phone number format validation involves verifying the length and prefix details at various levels to ensure accuracy and compliance with global numbering standards. A valid format means the number can be legitimately assigned by carriers to users. However, it does not guarantee that the number is currently assigned to a carrier or that it is reachable.
[JsonPropertyName("is_format_valid")]
public bool IsFormatValid { get; init; }
Property Value
NumberInternational
The phone_number from your request, formatted in international E.164 format.
[JsonPropertyName("number_international")]
public string NumberInternational { get; init; }
Property Value
NumberNational
The phone_number from your request, formatted according to the local convention of the country it belongs to.
[JsonPropertyName("number_national")]
public string NumberNational { get; init; }
Property Value
OfflineLocation
The location where the number was originally assigned, based on its prefix. This does not represent the real-time location of the device. The value indicates the country of origin or, when available, the specific geographical area associated with the number. Only landline and mobile numbers are eligible for offline location data.
[JsonPropertyName("offline_location")]
public string OfflineLocation { get; init; }
Property Value
Status
Indicates the status of the information returned for the specified phone number.
[JsonPropertyName("status")]
public InsightStatus Status { get; init; }
Property Value
TimeZones
List of time zones corresponding to the format.offline_location field, or a single-element list with the default "unknown" time zone if no other time zone was found or if the number is invalid. Time zone values follow the tz database identifiers.
[JsonPropertyName("time_zones")]
public string[] TimeZones { get; init; }
Property Value
- string[]