class HelpScout::User
User
developer.helpscout.net/objects/user/
Name Type Example Notes id Int 1234 Unique identifier firstName String Jack lastName String Sprout email String jack.sprout@gmail.com role String owner Role of this user. timezone String America/New_York photoUrl String http://.../avatar.jpg The user's photo, if one exists. createdAt DateTime 2011-04-01T03:18:33Z UTC time when this user was created. modifiedAt DateTime 2012-07-24T20:18:33Z UTC time when this user was modified.
Possible values for role include:
Constants
- ROLE_ADMIN
- ROLE_OWNER
- ROLE_USER
Attributes
createdAt[R]
email[R]
firstName[R]
id[R]
lastName[R]
modifiedAt[R]
photoUrl[R]
role[R]
timezone[R]
Public Class Methods
new(object)
click to toggle source
Creates a new User
object from a Hash of attributes
# File lib/helpscout/models.rb, line 468 def initialize(object) @createdAt = DateTime.iso8601(object["createdAt"]) if object["createdAt"] @modifiedAt = DateTime.iso8601(object["modifiedAt"]) if object["modifiedAt"] @id = object["id"] @firstName = object["firstName"] @lastName = object["lastName"] @email = object["email"] @role = object["role"] @timezone = object["timezone"] @photoUrl = object["photoUrl"] end
Public Instance Methods
to_s()
click to toggle source
Returns a String suitable for display
# File lib/helpscout/models.rb, line 482 def to_s "#{@firstName} #{@lastName}" end