DBUSERSAccount

Objective-C

@interface DBUSERSAccount : NSObject <DBSerializable, NSCopying>

Swift

class DBUSERSAccount : NSObject, DBSerializable, NSCopying

The Account struct.

The amount of detail revealed about an account depends on the user being queried and the user making the query.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

  • The user’s unique Dropbox ID.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull accountId;

    Swift

    var accountId: String { get }
  • Details of a user’s name.

    Declaration

    Objective-C

    @property (nonatomic, readonly) DBUSERSName *_Nonnull name;

    Swift

    var name: DBUSERSName { get }
  • The user’s email address. Do not rely on this without checking the emailVerified field. Even then, it’s possible that the user has since lost access to their email.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull email;

    Swift

    var email: String { get }
  • Whether the user has verified their email address.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull emailVerified;

    Swift

    var emailVerified: NSNumber { get }
  • URL for the photo representing the user, if one is set.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *profilePhotoUrl;

    Swift

    var profilePhotoUrl: String? { get }
  • Whether the user has been disabled.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull disabled;

    Swift

    var disabled: NSNumber { get }

Constructors

  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAccountId:(nonnull NSString *)accountId
                                         name:(nonnull DBUSERSName *)name
                                        email:(nonnull NSString *)email
                                emailVerified:(nonnull NSNumber *)emailVerified
                                     disabled:(nonnull NSNumber *)disabled
                              profilePhotoUrl:(nullable NSString *)profilePhotoUrl;

    Swift

    init(accountId: String, name: DBUSERSName, email: String, emailVerified: NSNumber, disabled: NSNumber, profilePhotoUrl: String?)

    Parameters

    accountId

    The user’s unique Dropbox ID.

    name

    Details of a user’s name.

    email

    The user’s email address. Do not rely on this without checking the emailVerified field. Even then, it’s possible that the user has since lost access to their email.

    emailVerified

    Whether the user has verified their email address.

    disabled

    Whether the user has been disabled.

    profilePhotoUrl

    URL for the photo representing the user, if one is set.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAccountId:(nonnull NSString *)accountId
                                         name:(nonnull DBUSERSName *)name
                                        email:(nonnull NSString *)email
                                emailVerified:(nonnull NSNumber *)emailVerified
                                     disabled:(nonnull NSNumber *)disabled;

    Swift

    init(accountId: String, name: DBUSERSName, email: String, emailVerified: NSNumber, disabled: NSNumber)

    Parameters

    accountId

    The user’s unique Dropbox ID.

    name

    Details of a user’s name.

    email

    The user’s email address. Do not rely on this without checking the emailVerified field. Even then, it’s possible that the user has since lost access to their email.

    emailVerified

    Whether the user has verified their email address.

    disabled

    Whether the user has been disabled.

    Return Value

    An initialized instance.