Class: Kampainer::ListManager
- Inherits:
-
Object
- Object
- Kampainer::ListManager
- Defined in:
- lib/kampainer/list_manager.rb
Overview
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Instance Method Summary collapse
- #create_update_contact_group(contact_group) ⇒ Object
- #delete_contact_groups(*ids) ⇒ Object
-
#initialize(session) ⇒ ListManager
constructor
A new instance of ListManager.
- #list_contact_groups ⇒ Object
Constructor Details
#initialize(session) ⇒ ListManager
Returns a new instance of ListManager.
6 7 8 |
# File 'lib/kampainer/list_manager.rb', line 6 def initialize(session) @session = session end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
4 5 6 |
# File 'lib/kampainer/list_manager.rb', line 4 def session @session end |
Instance Method Details
#create_update_contact_group(contact_group) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kampainer/list_manager.rb', line 11 def create_update_contact_group(contact_group) params = [ { contactGroupType: contact_group.type }, { contactGroupId: contact_group.id || 0 }, { name: contact_group.name }, { description: contact_group.description }, { isTempGroup: 'false' }, ] call('CreateUpdateContactGroups', *params)[0].id end |
#delete_contact_groups(*ids) ⇒ Object
22 23 24 |
# File 'lib/kampainer/list_manager.rb', line 22 def delete_contact_groups(*ids) call('DeleteContactGroups', ContactGroupIds.new(ids).to_xml) end |
#list_contact_groups ⇒ Object
26 27 28 |
# File 'lib/kampainer/list_manager.rb', line 26 def list_contact_groups call('ListContactGroups') end |