Click or drag to resize

PostalCodeLocation Constructor

Constructs a PostalCodeLocation object with a postal code (or zip code, post code, or postcode) and a two-letter country code representing the country that the postal code belongs to.

Namespace: DegreeDays.Api.Data.Impl
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public PostalCodeLocation(
	string postalCode,
	string twoLetterIsoCountryCodeInUpperCase
)

Parameters

postalCode  String
The non-null, non-empty postal code (or zip code, post code, or postcode) of the location you want data for. Cannot be longer than 16 characters (a length that we believe allows for all current postal codes worldwide), and cannot contain any characters other than [- 0-9a-zA-Z].
twoLetterIsoCountryCodeInUpperCase  String
The ISO 3166-1-alpha-2 country code of the country that postalCode belongs to. It must be a two-character string comprised of only characters A-Z (i.e. upper case only). For example, pass "US" if postalCode is a US zip code, pass "GB" (for "Great Britain") if postalCode is a UK post code, and pass "CA" if postalCode is a Canadian zip code.
Exceptions
ExceptionCondition
ArgumentNullExceptionpostalCode or twoLetterIsoCountryCodeInUpperCase is null.
FormatExceptionTests indicate that postalCode or twoLetterIsoCountryCodeInUpperCase fails to match the specifications detailed above.
See Also