Re: [paymentrequest] Write-up proposal for shipping address fields (#28)

I propose the following shipping address schema.

 ```WebIDL
 interface ShippingAddress {
    // CLDR (Common Locale Data Repository) region code.
    readonly attribute DOMString regionCode;

    // The address lines represent the most specific part of any address.
    readonly attribute sequence<DOMString> addressLine;

    // Top-level administrative subdivision of this country.
    readonly attribute DOMString administrativeArea;

    // Generally refers to the city/town portion of an address.
    readonly attribute DOMString locality;

    // Dependent locality or sublocality. Used for UK dependent localities, or
    // neighborhoods or boroughs in other locations.
    readonly attribute DOMString dependentLocality;

    // Values are frequently alphanumeric.
    readonly attribute DOMString postalCode;

    // This corresponds to the SortingCode sub-element of the xAL
    // PostalServiceElements element. Use is very country-specific.
    readonly attribute DOMString sortingCode;

    // Language code of the address. Should be in BCP-47 format.
    readonly attribute DOMString languageCode;

    // The organization, firm, company, or institution at this address. This
    // corresponds to the FirmName sub-element of the xAL FirmType element.
    readonly attribute DOMString organization;

    // Name of recipient or contact person. Not present in xAL.
    readonly attribute DOMString recipient;
};
```

This is based on [libaddressinput](https://github.com/googlei18n/libaddressinput/), which Chrome uses internally for autofill. In particular, these fields come from [address_data.h](https://github.com/googlei18n/libaddressinput/blob/master/cpp/include/libaddressinput/address_data.h). The field names correspond to the [OASIS xAL standard](https://www.oasis-open.org/committees/ciq/download.shtml).

This may not be The Best (tm) addressing schema overall, but a good start. I welcome discussion on this topic.

---
Reply to this email directly or view it on GitHub:
https://github.com/WICG/paymentrequest/issues/28#issuecomment-187369238

Received on Monday, 22 February 2016 20:27:08 UTC