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 -
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:
trueto save the address in the user’s account. - isPrimary:
trueto 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
resourceIdThe address resource id. Default value is an empty string.
firstNameThe address first name.
lastNameThe address last name.
address1The address line 1.
address2The address line 2. Default value is nil.
cityThe address city.
stateThe address state.
countryThe address country.
zipThe address zip code.
phoneThe address phone number.
savetrueto save the address in the user’s account.isPrimarytrueto make the address the primary address. - Parameters:
-
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:
trueto save the address in the user’s account. - isPrimary:
trueto make the address the primary address.
Declaration
Swift
public init?(json: JSON)Parameters
jsonJSON representation of object.
Return Value
New instance when JSON parsing successful, false otherwise.
- Parameters:
PCFAddress Struct Reference