Class: HelpScout::Customer::Email

Inherits:
Object
  • Object
show all
Defined in:
lib/helpscout/models.rb

Overview

Customer::Email developer.helpscout.net/objects/customer/email/

Name      Type    Example           Notes
id        Int     98131             Unique identifier
value     String  [email protected]   
location  String  work              Location for this email address. 
                                    Defaults to LOCATION_WORK

Possible values for location include:

  • LOCATION_WORK (Default)

  • LOCATION_HOME

  • LOCATION_OTHER

Constant Summary collapse

LOCATION_WORK =
"work"
LOCATION_HOME =
"home"
LOCATION_OTHER =
"other"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Email

Creates a new Customer::Email object from a Hash of attributes



711
712
713
714
715
# File 'lib/helpscout/models.rb', line 711

def initialize(object)
  @id = object["id"]
  @value = object["value"]
  @location = object["location"]
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



704
705
706
# File 'lib/helpscout/models.rb', line 704

def id
  @id
end

#locationObject (readonly)

Returns the value of attribute location.



704
705
706
# File 'lib/helpscout/models.rb', line 704

def location
  @location
end

#valueObject (readonly)

Returns the value of attribute value.



704
705
706
# File 'lib/helpscout/models.rb', line 704

def value
  @value
end