Class: Deliverhq::Message
- Inherits:
-
Object
- Object
- Deliverhq::Message
- Defined in:
- lib/deliverhq/models/message.rb
Instance Attribute Summary collapse
-
#address_identifier ⇒ Object
readonly
Returns the value of attribute address_identifier.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#body_from ⇒ Object
readonly
Returns the value of attribute body_from.
-
#body_to ⇒ Object
readonly
Returns the value of attribute body_to.
-
#bounce_body ⇒ Object
readonly
Returns the value of attribute bounce_body.
-
#envelope_from ⇒ Object
readonly
Returns the value of attribute envelope_from.
-
#envelope_to ⇒ Object
readonly
Returns the value of attribute envelope_to.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#mailbox_id ⇒ Object
readonly
Returns the value of attribute mailbox_id.
-
#server_id ⇒ Object
readonly
Returns the value of attribute server_id.
-
#spam ⇒ Object
readonly
Returns the value of attribute spam.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ Message
constructor
A new instance of Message.
Constructor Details
permalink #initialize(params) ⇒ Message
Returns a new instance of Message.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/deliverhq/models/message.rb', line 10 def initialize(params) @id = params["id"] @envelope_to = params["envelope_to"] @envelope_from = params[ "envelope_from"] @subject = params["subject"] @status = params["status"] @error = params["error"] @server_id = params[ "server_id"] @mailbox_id = params[ "mailbox_id"] @status_code = params[ "status_code"] @body = params[ "body"] @bounce_body = params[ "bounce_body"] @spam = params[ "spam"] @address_identifier = params["address_identifier"] @body_to = params[ "body_to"] @body_from = params[ "body_from"] end |
Instance Attribute Details
permalink #address_identifier ⇒ Object (readonly)
Returns the value of attribute address_identifier.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def address_identifier @address_identifier end |
permalink #body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def body @body end |
permalink #body_from ⇒ Object (readonly)
Returns the value of attribute body_from.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def body_from @body_from end |
permalink #body_to ⇒ Object (readonly)
Returns the value of attribute body_to.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def body_to @body_to end |
permalink #bounce_body ⇒ Object (readonly)
Returns the value of attribute bounce_body.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def bounce_body @bounce_body end |
permalink #envelope_from ⇒ Object (readonly)
Returns the value of attribute envelope_from.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def envelope_from @envelope_from end |
permalink #envelope_to ⇒ Object (readonly)
Returns the value of attribute envelope_to.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def envelope_to @envelope_to end |
permalink #error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def error @error end |
permalink #id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def id @id end |
permalink #mailbox_id ⇒ Object (readonly)
Returns the value of attribute mailbox_id.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def mailbox_id @mailbox_id end |
permalink #server_id ⇒ Object (readonly)
Returns the value of attribute server_id.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def server_id @server_id end |
permalink #spam ⇒ Object (readonly)
Returns the value of attribute spam.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def spam @spam end |
permalink #status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def status @status end |
permalink #status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def status_code @status_code end |
permalink #subject ⇒ Object (readonly)
Returns the value of attribute subject.
4 5 6 |
# File 'lib/deliverhq/models/message.rb', line 4 def subject @subject end |
Class Method Details
permalink .all(page = 1) ⇒ Object
[View source]
32 33 34 35 36 |
# File 'lib/deliverhq/models/message.rb', line 32 def self.all(page=1) Request::Message.list(page).collect do || new end end |
permalink .find(id) ⇒ Object
[View source]
28 29 30 |
# File 'lib/deliverhq/models/message.rb', line 28 def self.find(id) new(Request::Message.show(id)) end |