class HelpScout::Customer
Customer
developer.helpscout.net/objects/customer/
Attributes marked with a * are returned when listing customers. Other attributes are only returned when fetching a single customer.
Name Type Example Notes
*id Int 29418 Unique identifier *firstName String Vernon
*lastName String Bear
*email String vbear@mywork.com If the customer has multiple
emails, only one is returned.
*photoUrl String
*photoType String twitter Type of photo. *gender String Male Gender of this customer. *age String 30-35
*organization String Acme, Inc
*jobTitle String CEO and Co-Founder
*location String Austin *createdAt DateTime 2012-07-23T12:34:12Z UTC time when this customer
was created.
*modifiedAt DateTime 2012-07-24T20:18:33Z UTC time when this customer
was modified. background String I've worked with... This is the Background Info field from the UI. address Address socialProfiles Array Array of SocialProfiles emails Array Array of Emails phones Array Array of Phones chats Array Array of Chats websites Array Array of Websites
Possible values for photoType include:
Possible values for gender include:
Constants
- GENDER_FEMALE
- GENDER_MALE
- GENDER_UNKNOWN
- PHOTO_TYPE_FACEBOOK
- PHOTO_TYPE_GOOGLE_PLUS
- PHOTO_TYPE_GOOGLE_PROFILE
- PHOTO_TYPE_GRAVATAR
- PHOTO_TYPE_LINKEDIN
- PHOTO_TYPE_TWITTER
- PHOTO_TYPE_UNKNOWN
Attributes
Public Class Methods
Creates a new Customer
object from a Hash of attributes
# File lib/helpscout/models.rb, line 549 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"] @photoUrl = object["photoUrl"] @photoType = object["photoType"] @gender = object["gender"] @age = object["age"] @organization = object["organization"] @jobTitle = object["jobTitle"] @location = object["location"] @background = object["background"] @address = nil if object["address"] @address = Address.new(object["address"]) end @socialProfiles = [] if object["socialProfiles"] object["socialProfiles"].each do |item| @socialProfiles << SocialProfile.new(item) end end @emails = [] if object["emails"] object["emails"].each do |item| @emails << Email.new(item) end end @phones = [] if object["phones"] object["phones"].each do |item| @phones << Phone.new(item) end end @chats = [] if object["chats"] object["chats"].each do |item| @chats << Chat.new(item) end end @websites = [] if object["websites"] object["websites"].each do |item| @websites << Website.new(item) end end end
Public Instance Methods
Returns a String suitable for display
# File lib/helpscout/models.rb, line 607 def to_s "#{@firstName} #{@lastName}" end