Class: Mailchimp::List

Inherits:
Instance show all
Defined in:
lib/mailchimp_api_v3/list.rb,
lib/mailchimp_api_v3/member.rb,
lib/mailchimp_api_v3/interest.rb,
lib/mailchimp_api_v3/interest_category.rb

Defined Under Namespace

Classes: InterestCategories, InterestCategory, Member, Members

Instance Method Summary collapse

Methods inherited from Instance

#delete, get, #initialize, #matches?, #path, #same?, #subclass_from, #update

Constructor Details

This class inherits a constructor from Mailchimp::Instance

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Mailchimp::Instance

Instance Method Details

#id_and_nameObject



14
15
16
# File 'lib/mailchimp_api_v3/list.rb', line 14

def id_and_name
  "#{id}___#{name}"
end

#interest_categories(options = {}) ⇒ Object



10
11
12
# File 'lib/mailchimp_api_v3/list.rb', line 10

def interest_categories(options = {})
  subclass_from InterestCategories, options
end

#members(options = {}) ⇒ Object



5
6
7
8
# File 'lib/mailchimp_api_v3/list.rb', line 5

def members(options = {})
  id = options.convert_to_id if options.is_a?(String) && options.could_be_an_email?
  subclass_from Members, (id || options)
end