Class: HelpScout::Mailbox

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

Overview

Mailbox developer.helpscout.net/objects/mailbox/ developer.helpscout.net/objects/mailbox/mailbox-ref/

MailboxRefs are a subset of a full Mailbox object, and only include the attributes marked with a *.

MailboxRefs are returned by endpoints that include multiple mailboxes. A full Mailbox object can be obtained by fetching a single mailbox directly.

Name       Type      Example               Notes

*id Int 1234 Unique identifier *name String Feedback Name of the Mailbox

slug       String    47204a026903ce6d      Key used to represent this 
                                           Mailbox
email      String    [email protected]    Email address
createdAt  DateTime  2012-07-23T12:34:12Z  UTC time when this mailbox was 
                                           created.
modifiedAt DateTime  2012-07-24T20:18:33Z  UTC time when this mailbox was 
                                           modified.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Mailbox

Creates a new Mailbox object from a Hash of attributes



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'lib/helpscout/models.rb', line 81

def initialize(object)
  @createdAt = DateTime.iso8601(object["createdAt"]) if object["createdAt"]
  @modifiedAt = DateTime.iso8601(object["modifiedAt"]) if object["modifiedAt"]

  @id = object["id"]
  @name = object["name"]
  
  @slug = object["slug"]
  @email = object["email"]

  @folders = []
  if object["folders"]
    object["folders"].each do |folder|
      @folders << Folder.new(folder)
    end
  end      
end

Instance Attribute Details

#createdAtObject (readonly)

Returns the value of attribute createdAt.



78
79
80
# File 'lib/helpscout/models.rb', line 78

def createdAt
  @createdAt
end

#emailObject (readonly)

Returns the value of attribute email.



78
79
80
# File 'lib/helpscout/models.rb', line 78

def email
  @email
end

#foldersObject (readonly)

Returns the value of attribute folders.



78
79
80
# File 'lib/helpscout/models.rb', line 78

def folders
  @folders
end

#idObject (readonly)

Returns the value of attribute id.



78
79
80
# File 'lib/helpscout/models.rb', line 78

def id
  @id
end

#modifiedAtObject (readonly)

Returns the value of attribute modifiedAt.



78
79
80
# File 'lib/helpscout/models.rb', line 78

def modifiedAt
  @modifiedAt
end

#nameObject (readonly)

Returns the value of attribute name.



78
79
80
# File 'lib/helpscout/models.rb', line 78

def name
  @name
end

#slugObject (readonly)

Returns the value of attribute slug.



78
79
80
# File 'lib/helpscout/models.rb', line 78

def slug
  @slug
end