Class: Exacto::ListUnsubscription

Inherits:
Unsubscription show all
Defined in:
lib/exacto_subscriber/list_unsubscription.rb

Instance Attribute Summary

Attributes inherited from Unsubscription

#email_address, #status, #unsubscribed_at

Class Method Summary collapse

Methods inherited from Unsubscription

#initialize, #response_system_name

Constructor Details

This class inherits a constructor from Exacto::Unsubscription

Class Method Details

.find(list_id) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/exacto_subscriber/list_unsubscription.rb', line 7

def self.find(list_id)
  response = issue_request("list") do |xml|
    xml.action "retrieve_sub"
    xml.search_type "listid"
    xml.search_value list_id
    xml.search_status "Unsubscribed"
  end
  
  response = [response] if response.is_a?(Hash) && !response.empty?
  response.collect do |i|
    new(normalize(i))
  end
end

.request_system_nameObject



3
4
5
# File 'lib/exacto_subscriber/list_unsubscription.rb', line 3

def self.request_system_name
  "tracking-channel"
end

.response_system_nameObject



21
22
23
# File 'lib/exacto_subscriber/list_unsubscription.rb', line 21

def self.response_system_name
  "subscriber"
end

.trim_response(response) ⇒ Object



25
26
27
# File 'lib/exacto_subscriber/list_unsubscription.rb', line 25

def self.trim_response(response)
  super["list"]["subscribers"]
end