Class: HelpScout::Mailbox
- Inherits:
-
Object
- Object
- HelpScout::Mailbox
- 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
-
#createdAt ⇒ Object
readonly
Returns the value of attribute createdAt.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#folders ⇒ Object
readonly
Returns the value of attribute folders.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#modifiedAt ⇒ Object
readonly
Returns the value of attribute modifiedAt.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(object) ⇒ Mailbox
constructor
Creates a new Mailbox object from a Hash of attributes.
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
#createdAt ⇒ Object (readonly)
Returns the value of attribute createdAt.
78 79 80 |
# File 'lib/helpscout/models.rb', line 78 def createdAt @createdAt end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
78 79 80 |
# File 'lib/helpscout/models.rb', line 78 def email @email end |
#folders ⇒ Object (readonly)
Returns the value of attribute folders.
78 79 80 |
# File 'lib/helpscout/models.rb', line 78 def folders @folders end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
78 79 80 |
# File 'lib/helpscout/models.rb', line 78 def id @id end |
#modifiedAt ⇒ Object (readonly)
Returns the value of attribute modifiedAt.
78 79 80 |
# File 'lib/helpscout/models.rb', line 78 def modifiedAt @modifiedAt end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
78 79 80 |
# File 'lib/helpscout/models.rb', line 78 def name @name end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
78 79 80 |
# File 'lib/helpscout/models.rb', line 78 def slug @slug end |