I18nPhonenumbersPhoneNumber

GoogleApi.ContentWarehouse.V1.Model.I18nPhonenumbersPhoneNumber


Table of Contents ▼

Jump to a specific part of the page:

Description

The PhoneNumber object that is used by all LibPhoneNumber API's to fully represent a phone number.

Attributes List

This module has the following attributes (case-insensitive ascending order):

View Attributes

Attributes

  1. countryCode (type: integer(), default: nil)
    - The country calling code for this number, as defined by the International Telecommunication Union (ITU). For example, this would be 1 for NANPA countries, and 33 for France.
  2. countryCodeSource (type: String.t, default: nil)
    - The source from which the country_code is derived.
  3. extension (type: String.t, default: nil)
    - Extension is not standardized in ITU recommendations, except for being defined as a series of numbers with a maximum length of 40 digits. It is defined as a string here to accommodate for the possible use of a leading zero in the extension (organizations have complete freedom to do so, as there is no standard defined). Other than digits, some other dialling characters such as "," (indicating a wait) may be stored here.
  4. italianLeadingZero (type: boolean(), default: nil)
    - In some countries, the national (significant) number starts with one or more "0"s without this being a national prefix or trunk code of some kind. For example, the leading zero in the national (significant) number of an Italian phone number indicates the number is a fixed-line number. There have been plans to migrate fixed-line numbers to start with the digit two since December 2000, but it has not happened yet. See http://en.wikipedia.org/wiki/%2B39 for more details. These fields can be safely ignored (there is no need to set them) for most countries. Some limited number of countries behave like Italy - for these cases, if the leading zero(s) of a number would be retained even when dialling internationally, set this flag to true, and also set the number of leading zeros. Clients who use the parsing or conversion functionality of the i18n phone number libraries (go/phonenumbers) will have these fields set if necessary automatically.
  5. nationalNumber (type: String.t, default: nil)
    - The National (significant) Number, as defined in International Telecommunication Union (ITU) Recommendation E.164, without any leading zero. The leading-zero is stored separately if required, since this is an uint64 and hence cannot store such information. Do not use this field directly: if you want the national significant number, call the getNationalSignificantNumber method of PhoneNumberUtil. For countries which have the concept of an "area code" or "national destination code", this is included in the National (significant) Number. Although the ITU says the maximum length should be 15, we have found longer numbers in some countries e.g. Germany. Note that the National (significant) Number does not contain the National (trunk) prefix. Obviously, as a uint64, it will never contain any formatting (hyphens, spaces, parentheses), nor any alphanumeric spellings.
  6. numberOfLeadingZeros (type: integer(), default: nil)
    - Full description of this field in the comment for italian_leading_zero since this field will only be set when italian_leading_zero is true.
  7. preferredDomesticCarrierCode (type: String.t, default: nil)
    - The carrier selection code that is preferred when calling this phone number domestically. This also includes codes that need to be dialed in some countries when calling from landlines to mobiles or vice versa. For example, in Columbia, a "3" needs to be dialed before the phone number itself when calling from a mobile phone to a domestic landline phone and vice versa. Note this is the "preferred" code, which means other codes may work as well.
  8. rawInput (type: String.t, default: nil)
    - This field is used to store the raw input string containing phone numbers before it was canonicalized by the library. For example, it could be used to store alphanumerical numbers such as "1-800-GOOG-411".

Type

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.I18nPhonenumbersPhoneNumber{
countryCode: integer() | nil,
countryCodeSource: String.t() | nil,
extension: String.t() | nil,
italianLeadingZero: boolean() | nil,
nationalNumber: String.t() | nil,
numberOfLeadingZeros: integer() | nil,
preferredDomesticCarrierCode: String.t() | nil,
rawInput: String.t() | nil
}

Function

@spec decode(struct(), keyword()) :: struct()

Data sourced from HexDocs : GoogleApi.ContentWarehouse.V1.Model.I18nPhonenumbersPhoneNumber