class HelpScout::Person

Person developer.helpscout.net/objects/person/

The person object is a subset of the data representing a Customer or User. The 'type' property will specify if this person is represented by a 'user' or a 'customer'.

Name        Type      Example                 Notes
id          Int       1234                    Unique identifier
firstName   String    Jack   
lastName    String    Sprout   
email       String    jack.sprout@gmail.com  
phone       String    800-555-1212  
type        String    user

Possible values for type include:

Constants

TYPE_CUSTOMER
TYPE_USER

Attributes

email[R]
firstName[R]
id[R]
lastName[R]
phone[R]
type[R]

Public Class Methods

new(object) click to toggle source

Creates a new Person object from a Hash of attributes

# File lib/helpscout/models.rb, line 422
def initialize(object)
  @id = object["id"]
  @firstName = object["firstName"]
  @lastName = object["lastName"]
  @email = object["email"]
  @phone = object["phone"]
  @type = object["type"]
end

Public Instance Methods

to_s() click to toggle source

Returns a String suitable for display

# File lib/helpscout/models.rb, line 432
def to_s
  "#{@firstName} #{@lastName}"
end