Sha256: 469bf14e900b9f7cc2418ae6b5375a16f6c8cf3db7fc0ec1ee82f39e22cf2e5f

Contents?: true

Size: 575 Bytes

Versions: 2

Compression:

Stored size: 575 Bytes

Contents

module ActsAsIcontact
  class Contact < Resource
    
    # Email is required
    def self.required_on_create
      super << 'email'
    end
    
    # Derived from clientFolder
    def self.base
      ActsAsIcontact.client
    end
    
    # Defaults to status=total to return contacts on or off lists
    def self.default_options
      super.merge(:status=>:total)
    end
   
    # Returns the lists to which this contact is subscribed (via the Subscription class).
    def lists
      @lists ||= ActsAsIcontact::Subscription.lists(:contactId => id)
    end
    
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
SFEley-acts_as_icontact-0.2.3 lib/acts_as_icontact/resources/contact.rb
acts_as_icontact-0.2.3 lib/acts_as_icontact/resources/contact.rb