HSBeaconUser
Objective-C
@interface HSBeaconUser : NSObject
Swift
class HSBeaconUser : NSObject
HSBeaconUser
represents a user identified with Help Scout, allowing you to
match up support requests to your customer base.
The current user may be identified by creating an HSBeaconUser
object,
configuring its properties, and then identifying them using [HSBeacon identify:]
.
-
The email address for the current user.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *email;
Swift
var email: String? { get set }
-
The name of the current user.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *name;
Swift
var name: String? { get set }
-
The company of the current user. The max length of this value is
HSBeaconMaxUserCompanyLength
(60) and will be truncated to fit.Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *company;
Swift
var company: String? { get set }
-
The job title of the current user. The max length of this value is
HSBeaconMaxUserJobTitleLength
(60) and will be truncated to fit.Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *jobTitle;
Swift
var jobTitle: String? { get set }
-
The URL to the avatar of the current user. The max length of this value is
HSBeaconMaxUserAvatarLength
(200) and will not be set if theabsoluteString
exceeds that length.Declaration
Objective-C
@property (nonatomic, strong, nullable) NSURL *avatar;
Swift
var avatar: URL? { get set }
-
The attributes for the current user. These are arbitrary key/value pairs that will be sent to Help Scout to help identify the current user. You may add up to 30 different attributes.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSDictionary *_Nonnull attributes;
Swift
var attributes: [AnyHashable : Any] { get }
-
Adds an attribute with a given key to the attributes dictionary. The attributes dictionary is limited to 30 entries.
@returns True if the attribute was added; false if the attribute limit has been reached.
Declaration
Objective-C
- (BOOL)addAttributeWithKey:(nonnull NSString *)key value:(nonnull NSString *)value;
Swift
func addAttribute(withKey key: String, value: String) -> Bool
-
Removes an attribute with a given key from the attributes dictionary.
Declaration
Objective-C
- (void)removeAttributeWithKey:(nonnull NSString *)key;
Swift
func removeAttribute(withKey key: String)
-
Clears the current attributes dictionary.
Declaration
Objective-C
- (void)clearAttributes;
Swift
func clearAttributes()
-
Check if two users are equal
Declaration
Objective-C
- (BOOL)isEqualToBeaconUser:(nonnull HSBeaconUser *)user;
Swift
func isEqual(to user: HSBeaconUser) -> Bool