OrderAddress

@objc(PPCOrderAddress)
@objcMembers
class OrderAddress
extension OrderAddress : CVarArg, CustomDebugStringConvertible, CustomStringConvertible, Decodable, Encodable, Equatable, Hashable, NSObjectProtocol

Describes an address.

Should be used in the creation of the folowing objects

  • The first line of the address. For example, number or street. For example, 173 Drury Lane. Required for data entry and compliance and risk checks. Must contain the full address. Maximum length: 300.

    Declaration

    Swift

    let addressLine1: String?
  • The second line of the address. For example, suite or apartment number. Maximum length: 300.

    Declaration

    Swift

    let addressLine2: String?
  • The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example, CA and not California.

    Value, by country, is:

    • UK: A county.
    • US: A state.
    • Canada: A province.
    • Japan: A prefecture.
    • Switzerland: A kanton.

    Maximum length: 300.

    Declaration

    Swift

    let adminArea1: String?
  • A city, town, or village. Smaller than admin_area_level_1.

    • Maximum length: 120.

    Declaration

    Swift

    let adminArea2: String?
  • The two-character ISO 3166-1 code that identifies the country or region.

    Declaration

    Swift

    let countryCode: String
  • Undocumented

    Declaration

    Swift

    init(countryCode: String, addressLine1: String? = nil, addressLine2: String? = nil, adminArea1: String? = nil, adminArea2: String? = nil, postalCode: String? = nil)
  • Creates a new instance by decoding from the given decoder.

    This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.

    Declaration

    Swift

    init(from decoder: Decoder) throws
  • The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent.

    • Maximum length: 60.

    Declaration

    Swift

    let postalCode: String?