Customer
@objcMembers
public final class Customer : NSObject, Decodable, OptionallyIdentifiableWithString
Customer model.
-
Customer identifier (if you know it).
Declaration
Swift
public var identifier: String? -
Customer’s email address.
Declaration
Swift
public var emailAddress: EmailAddress? -
Customer’s phone number.
Declaration
Swift
public var phoneNumber: PhoneNumber? -
Customer’s first name.
Declaration
Swift
public var firstName: String? -
Customer’s middle name.
Declaration
Swift
public var middleName: String? -
Customer’s last name.
Declaration
Swift
public var lastName: String? -
An arbitrary string attached to the object. Often useful for displaying to users.
Declaration
Swift
public var descriptionText: String? -
Set of key/value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format.
Declaration
Swift
public var metadata: Metadata? -
Customer title.
Declaration
Swift
public var title: String? -
Customer’s nationality.
Declaration
Swift
public var nationality: String? -
Currency in which customer can be charged.
Declaration
Swift
public var currency: Currency?
-
Initializes the customer with email address, phone number and a name.
Throws
Invalid customer info error.Declaration
Swift
public convenience init(emailAddress: EmailAddress, phoneNumber: PhoneNumber, name: String) throwsParameters
emailAddressEmail address.
phoneNumberPhone number.
nameName.
-
Initializes the customer with email address, phone number, first name, middle name and last name.
Throws
Invalid customer info error.Declaration
Swift
public convenience init(emailAddress: EmailAddress, phoneNumber: PhoneNumber, firstName: String, middleName: String?, lastName: String?) throwsParameters
emailAddressEmail address.
phoneNumberPhone number.
firstNameFirst name.
middleNameMiddle name.
lastNameLast name.
-
Initializes the customer with the customer identifier.
Throws
Invalid customer info error.Declaration
Swift
public convenience init(identifier: String) throwsParameters
identifierCustomer identifier.
-
Checks if the receiver is equal to
object.Declaration
Swift
public override func isEqual(_ object: Any?) -> BoolParameters
objectObject to test equality with.
Return Value
trueif the receiver is equal toobject,falseotherwise. -
Checks if 2 objects are equal.
Declaration
Swift
public static func == (lhs: Customer, rhs: Customer) -> BoolParameters
lhsFirst object.
rhsSecond object.
Return Value
trueif 2 objects are equal,faleotherwise.
-
Copies the receiver.
Declaration
Swift
public func copy(with zone: NSZone? = nil) -> AnyParameters
zoneZone.
Return Value
Copy of the receiver.
-
Encodes the contents of the receiver.
Throws
EncodingErrorDeclaration
Swift
public func encode(to encoder: Encoder) throwsParameters
encoderEncoder.
Customer Class Reference