BTPostalAddress
@objcMembers
public class BTPostalAddress : NSObject, Encodable
Generic postal address
-
Creats a postal address with all components
Declaration
Swift
public init( recipientName: String? = nil, streetAddress: String? = nil, extendedAddress: String? = nil, locality: String? = nil, countryCodeAlpha2: String? = nil, postalCode: String? = nil, region: String? = nil )Parameters
recipientNameOptional. Recipient name for shipping address.
streetAddressOptional. Line 1 of the Address (eg. number, street, etc).
extendedAddressOptional. Line 2 of the Address (eg. suite, apt #, etc.).
localityOptional. City name
countryCodeAlpha2Optional. 2 letter country code.
postalCodeOptional. Zip code or equivalent is usually required for countries that have them. For a list of countries that do not have postal codes please refer to http://en.wikipedia.org/wiki/Postal_code.
regionOptional. Either a two-letter state code (for the US), or an ISO-3166-2 country subdivision code of up to three letters.
-
Returns address components as a dictionary for accessing internal properties across modules
Declaration
Swift
public func addressComponents() -> [String : String]
View on GitHub