Address

data class Address(val streetNumber: String = "", val streetName: String = "", val municipalitySubdivision: String = "", val municipality: String = "", val countrySecondarySubdivision: String = "", val countryTertiarySubdivision: String = "", val countrySubdivision: String = "", val postalCode: String = "", val extendedPostalCode: String = "", val countryCode: String = "", val country: String = "", val countryCodeIso3: String = "", val freeformAddress: String = "", val countrySubdivisionName: String = "", val localName: String = "", val streetNameAndNumber: String = "", val postalName: String = "", val countrySubdivisionCode: String = "", val neighborhoodName: String = "")

Detailed address information.

Throws

if all the properties are empty.

Constructors

Link copied to clipboard
constructor(streetNumber: String = "", streetName: String = "", municipalitySubdivision: String = "", municipality: String = "", countrySecondarySubdivision: String = "", countryTertiarySubdivision: String = "", countrySubdivision: String = "", postalCode: String = "", extendedPostalCode: String = "", countryCode: String = "", country: String = "", countryCodeIso3: String = "", freeformAddress: String = "", countrySubdivisionName: String = "", localName: String = "", streetNameAndNumber: String = "", postalName: String = "", countrySubdivisionCode: String = "", neighborhoodName: String = "")

Properties

Link copied to clipboard

The name of the country.

Link copied to clipboard

The ISO 3166-1 alpha-2 standard country code. For example: "US". See https://www.iso.org/obp/ui/#iso:std:iso:3166:-1:ed-4:v1:en for more details.

Link copied to clipboard

The ISO 3166-1 alpha-3 standard country code. For example: "USA". See https://www.iso.org/obp/ui/#iso:std:iso:3166:-1:ed-4:v1:en for more details.

Link copied to clipboard

The second-level administrative division. For example: a department in France, such as Pas-de-Calais in region Hauts-de-France.

Link copied to clipboard

The first-level administrative division. For example: a region in France, such as Hauts-de-France.

Link copied to clipboard

A code for the first-level subdivision of a country that is used alongside the countryCode to form the ISO 3166-2 code of the subdivision.The format of the ISO 3166-2 code is countryCode-countrySubdivisionCode. For example: "ON" (ISO 3166-2: "CA-ON") for Ontario, "TX" (ISO 3166-2: "US-TX") for Texas or "ZE" (ISO 3166-2: "NL-ZE") for Zeeland.

Link copied to clipboard

The full name of the first-level administrative division of a country if countrySubdivision contains an abbreviation of the name, or empty otherwise. Supported only for the USA, Canada and the UK.

Link copied to clipboard

The third-level administrative division. For example: an arrondissement in France, such as Calais in department Pas-de-Calais.

Link copied to clipboard

The extended postal code (availability dependent on region).

Link copied to clipboard

The freeform address. It represents the full address in a free text form.

Link copied to clipboard

The local name. It represents an address component that contains the name of a geographical area that groups a number of addressable objects for addressing purposes, without being an administrative unit.

Link copied to clipboard

The city/town.

Link copied to clipboard

The city district. For example: Zuidoost in Amsterdam.

Link copied to clipboard

The name of the neighborhood. Neighborhoods often have a semi-official status and are not necessarily part of an administrative structure. They are defined on a cultural, social or economic basis. For example, a neighborhood could be an area with touristic appeal, such as a restaurant area with a specific atmosphere. In general, neighborhoods don't have official borders or an equivalent in administrative or postal sources. Names of neighborhoods are commonly known and often used as place names. Examples: Karolinenviertel in Hamburg, Little Italy in New York, Quartier Pigalle in Paris, Soho in London, Museum Island in Berlin.

Link copied to clipboard

The postal code.

Link copied to clipboard

The postal name. It represents an address component that contains the postal code related to a single administrative area, city, town, or another populated place.

Link copied to clipboard

The name of the street.

Link copied to clipboard

The street name and number combined in the correct order.

Link copied to clipboard

The number of the building.