Class: Interspire::ContactList

Inherits:
Object
  • Object
show all
Defined in:
lib/interspire/contact_list.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(details) ⇒ ContactList

Instantiate with hash of contact list details that should look like this:

{
  :id => '42',  # Contact list ID.
  :name => 'Serious Contacts',
  :subscribe_count => '6420',
  :unsubscribe_count => '421',
  :auto_responder_count => '124'
}

Parameters:

  • details (Hash)

    A hash of contact list info.



16
17
18
19
20
21
22
# File 'lib/interspire/contact_list.rb', line 16

def initialize(details)
  @id = details[:id]
  @name = details[:name]
  @subscribe_count = details[:subscribe_count]
  @unsubscribe_count = details[:unsubscribe_count]
  @auto_responder_count = details[:auto_responder_count]
end

Instance Attribute Details

#auto_responder_countObject (readonly)

Returns the value of attribute auto_responder_count.



3
4
5
# File 'lib/interspire/contact_list.rb', line 3

def auto_responder_count
  @auto_responder_count
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/interspire/contact_list.rb', line 3

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/interspire/contact_list.rb', line 3

def name
  @name
end

#subscribe_countObject (readonly)

Returns the value of attribute subscribe_count.



3
4
5
# File 'lib/interspire/contact_list.rb', line 3

def subscribe_count
  @subscribe_count
end

#unsubscribe_countObject (readonly)

Returns the value of attribute unsubscribe_count.



3
4
5
# File 'lib/interspire/contact_list.rb', line 3

def unsubscribe_count
  @unsubscribe_count
end