PCFAddress

Undocumented

  • Unique identifier for the address.

    Declaration

    Swift

    public let resourceId: String
  • First name on the address.

    Declaration

    Swift

    public let firstName: String
  • Last name on the address.

    Declaration

    Swift

    public let lastName: String
  • First street address field.

    Declaration

    Swift

    public let address1: String
  • Second street address field.

    Declaration

    Swift

    public let address2: String?
  • City on address.

    Declaration

    Swift

    public let city: String
  • State (or region/province) on address. The recommendation for this value is for it to be a standard state/region/province abbreviation so that it can be used with the ‘countries’ endpoint, but implementations may vary depending on requirements.

    Declaration

    Swift

    public let state: String?
  • Country on address. The recommendation for this value is for it to be a standard country abbreviation so that it can be used with the ‘countries’ endpoint, but implementations may vary depending on requirements.

    Declaration

    Swift

    public let country: String
  • zip

    Postal code on address.

    Declaration

    Swift

    public let zip: String
  • Phone number associated with address.

    Declaration

    Swift

    public let phone: String?
  • Used by some endpoints to store the address as a resource that can be used later.

    Declaration

    Swift

    public let save: Bool
  • Indicates whether or not the address is the default address.

    Declaration

    Swift

    public let isPrimary: Bool
  • Initializes a PCF address.

    • Parameters:
      • resourceId: The address resource id. Default value is an empty string.
      • firstName: The address first name.
      • lastName: The address last name.
      • address1: The address line 1.
      • address2: The address line 2. Default value is nil.
      • city: The address city.
      • state: The address state.
      • country: The address country.
      • zip: The address zip code.
      • phone: The address phone number.
      • save: true to save the address in the user’s account.
      • isPrimary: true to make the address the primary address.

    Declaration

    Swift

    public init(resourceId: String = "",
                    firstName: String,
                    lastName: String,
                    address1: String,
                    address2: String? = nil,
                    city: String,
                    state: String? = nil,
                    country: String,
                    zip: String,
                    phone: String? = nil,
                    save: Bool,
                    isPrimary: Bool)

    Parameters

    resourceId

    The address resource id. Default value is an empty string.

    firstName

    The address first name.

    lastName

    The address last name.

    address1

    The address line 1.

    address2

    The address line 2. Default value is nil.

    city

    The address city.

    state

    The address state.

    country

    The address country.

    zip

    The address zip code.

    phone

    The address phone number.

    save

    true to save the address in the user’s account.

    isPrimary

    true to make the address the primary address.

  • Initializes a PCF address.

    • Parameters:
      • resourceId: The address resource id. Default value is an empty string.
      • firstName: The address first name.
      • lastName: The address last name.
      • address1: The address line 1.
      • address2: The address line 2. Default value is nil.
      • city: The address city.
      • state: The address state.
      • country: The address country.
      • zip: The address zip code.
      • phone: The address phone number.
      • save: true to save the address in the user’s account.
      • isPrimary: true to make the address the primary address.

    Declaration

    Swift

    public init?(json: JSON)

    Parameters

    json

    JSON representation of object.

    Return Value

    New instance when JSON parsing successful, false otherwise.