Class: ActsAsIcontact::MessageBounces

Inherits:
Subresource show all
Includes:
ReadOnly
Defined in:
lib/acts_as_icontact/resources/message_bounces.rb

Overview

The read-only list of bounces attached to every Message. Because of this intrinsic association, the usual #find methods don’t work; this collectin must be obtained using the individual message’s #bounces method.

Property updates and saving are also prohibited (returning a ReadOnlyError exception.)

Instance Attribute Summary

Attributes inherited from Subresource

#parent

Instance Method Summary collapse

Methods included from ReadOnly

#cannot_save, #method_missing

Methods inherited from Subresource

cannot_query, #initialize, scoped_find

Methods inherited from Resource

#==, all, #connection, #error, #errors, find, find_by_id, first, #id, #initialize, #inspect, #method_missing, #new_record?, #property_names, #save, #save!

Constructor Details

This class inherits a constructor from ActsAsIcontact::Subresource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActsAsIcontact::ReadOnly

Instance Method Details

#contactObject

Retrieves the contact pointed to by this message record’s contactId.



11
12
13
# File 'lib/acts_as_icontact/resources/message_bounces.rb', line 11

def contact
  @contact ||= ActsAsIcontact::Contact.find(contactId.to_i) if contactId.to_i > 0
end