Class ContactAddress
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalContactAddress interface of the Contact Picker API represents a physical address. Instances of this interface are retrieved from the address property of the objects returned by GetProperties().
[Value("ContactAddress")]
public class ContactAddress
- Inheritance
-
ContactAddress
- Inherited Members
Remarks
It may be useful to refer to the Universal Postal Union website's Addressing S42 standard materials, which provide information about international standards for postal addresses.
Constructors
ContactAddress()
public ContactAddress()
Properties
AddressLine
NOTE
ExperimentaladdressLine read-only property of the ContactAddress interface is an array of strings, each specifying a line of the address that is not covered by one of the other properties of ContactAddress. The array may include the street name, the house number, apartment number, the rural delivery route, descriptive instructions, or the post office box.
[Value("addressLine")]
public string[] AddressLine { get; }
Property Value
- string[]
An array of strings, each containing one line of the address. For example, the
addressLineproperty for the Mozilla Space in London would have the following entries:
These, combined with additional values for other properties of the ContactAddress, would represent the full address, which is:Index addressLine[] value 0 Metal Box Factory 1 Suite 441, 4th floor 2 30 Great Guildford Street
Remarks
City
NOTE
Experimentalcity read-only property of the ContactAddress interface returns a string containing the city or town portion of the address.
[Value("city")]
public string City { get; }
Property Value
- string
A string indicating the city or town portion of the address described by the ContactAddress object.
Remarks
Country
NOTE
Experimentalcountry read-only property of the ContactAddress interface is a string identifying the address's country using the ISO 3166-1 alpha-2 standard. The string is always in its canonical upper-case form.
[Value("country")]
public string Country { get; }
Property Value
- string
A string which contains the ISO3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner."
Remarks
Some examples of valid country values: "US", "GB", "CN", or "JP".
DependentLocality
NOTE
ExperimentaldependentLocality property of the ContactAddress interface is a string containing a locality or sublocality designation within a city, such as a neighborhood, borough, district, or, in the United Kingdom, a dependent locality. Also known as a post town.
[Value("dependentLocality")]
public string DependentLocality { get; }
Property Value
- string
A string indicating the sublocality portion of the address. This may be an empty string if no sublocality is available or required. It's used to provide disambiguation when a city may include areas that duplicate street names.A sublocality is an area within a city, such as a neighborhood, borough, or district. In the United Kingdom, this is used to indicate the post town in the United Kingdom (known officially by the Royal Mail as the dependent locality). This is a disambiguating feature of addresses in places where a city may have areas that duplicate street names.
Remarks
Organization
NOTE
Experimentalorganization read-only property of the ContactAddress interface returns a string containing the name of the organization, firm, company, or institution at the address.
[Value("organization")]
public string Organization { get; }
Property Value
- string
A string whose value is the name of the organization or company located at the address described by the
ContactAddressobject.
Remarks
Phone
NOTE
Experimentalphone property of the ContactAddress interface returns a string containing the telephone number of the recipient or contact person at the address.
[Value("phone")]
public string Phone { get; }
Property Value
- string
A string containing the telephone number for the recipient of the shipment. If no phone number is available, this value is an empty string.
Remarks
PostalCode
NOTE
ExperimentalpostalCode read-only property of the ContactAddress interface returns a string containing a code used by a jurisdiction for mail routing, for example, the ZIP Code in the United States or the Postal Index Number (PIN code) in India.
[Value("postalCode")]
public string PostalCode { get; }
Property Value
- string
A string which contains the postal code portion of the address. A postal code is a string (either numeric or alphanumeric) which is used by a postal service to optimize mail routing and delivery.Various countries use different terms for this. In most of the world, it's known as the "post code" or "postal code". In the United States, the ZIP code is used. India uses PIN codes.
Remarks
-Universal Postal Union: Universal Post*CodeĀ® Database
Recipient
NOTE
Experimentalrecipient property of the ContactAddress interface returns a string containing the name of the recipient, purchaser, or contact person at the address.
[Value("recipient")]
public string Recipient { get; }
Property Value
- string
A string giving the name of the person=, or the name of a contact person in other contexts. If no name is available, this string is empty.
Remarks
Region
NOTE
Experimentalregion property of the ContactAddress interface returns a string containing the top-level administrative subdivision of the country in which the address is located. This may be a state, province, oblast, or prefecture.
[Value("region")]
public string Region { get; }
Property Value
- string
A string specifying the top-level administrative subdivision within the country in which the address is located. This region has different names in different countries, such as: state, province, oblast, prefecture, or county.
Remarks
SortingCode
NOTE
ExperimentalsortingCode read-only property of the ContactAddress interface returns a string containing a postal sorting code such as is used in France.
[Value("sortingCode")]
public string SortingCode { get; }
Property Value
- string
A string containing the sorting code portion of the address.
Remarks
Methods
ToJSON()
NOTE
ExperimentaltoJSON() method of the ContactAddress interface is a standard serializer that returns a JSON representation of the ContactAddress object's properties.
[Value("toJSON")]
public Object ToJSON()
Returns
- Object
A JSON object.