class HelpScout::Mailbox

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    feedback@parse.com    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.

Attributes

createdAt[R]
email[R]
folders[R]
id[R]
modifiedAt[R]
name[R]
slug[R]

Public Class Methods

new(object) click to toggle source

Creates a new Mailbox object from a Hash of attributes

# 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