User

final public class User : CustomStringConvertible, CustomDebugStringConvertible, ExtendedEquatable

Mutable model representing a [User] linked to an [Entity]

  • Username property constant. Use with subscript to return the username from a user instance.

       e.g. let username = user[User.username]
    

    NB username is still accesible via a property getter

       e.g. let username = user.username
    

    Declaration

    Swift

    public static let username: String
  • Phone Number property constant. Use with subscript to return the phoneNumber from a user instance.

       e.g. let phoneNumber = user[User.phoneNumber]
    

    Declaration

    Swift

    public static let phoneNumber: String
  • Status property constant. Can be used with subscript to return the status from a user instance.

       e.g. let status = user[User.status]
    

    Declaration

    Swift

    public static let status: String
  • Accreditation level property constant. Can be used with subscript to return the accreditationLevel from a user instance.

       e.g. let accreditationLevel = user[User.accreditationLevel]
    

    Declaration

    Swift

    public static let accreditationLevel: String
  • User username (read only).

    Declaration

    Swift

    public internal(set) var username: String? {
      get
      }
  • User status (read only). Get using subscript.

    let userStatus = user[User.status]
    

    Declaration

    Swift

    public internal(set) var status: User.Status? {
      get
      }
  • User accreditation level (read only). Get using subscript.

    let accreditationLevel = user[User.accreditationLevel]
    

    Declaration

    Swift

    public internal(set) var accreditationLevel: User.AccreditationLevel? {
      get
      }
  • Status options

    • unverified: user is unverified
    • unregistered: user is unregistered
    • uncertified: user is uncertified
    • certificatePending: user has requested certification
    • certified: user has been certified
    • revoked: user is revoked
    • locked: user is locked
    • unknown: user status is unknown
    See more

    Declaration

    Swift

    public enum Status : String
  • Level at which the user is accredited

    • l1: Level 1 accreditation (Self accreditation)
    • l2: Level 2 accreditation (Online accreditation)
    • l3: Level 3 accreditation (In person accreditation)
    See more

    Declaration

    Swift

    public enum AccreditationLevel : String
  • Init

    Declaration

    Swift

    public init()
  • User subscript

    Declaration

    Swift

    public subscript(key: String) -> Any? { get set }

    Parameters

    key

    Key of property to return

  • CustomStringConvertible

    Declaration

    Swift

    public var description: String { get }
  • CustomDebugStringConvertible

    Declaration

    Swift

    public var debugDescription: String { get }