<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -180,6 +180,13 @@ class CampaignMonitor
     Result.new(Subscriber_Add(&quot;ListID&quot; =&gt; list_id, &quot;Email&quot; =&gt; email, &quot;Name&quot; =&gt; name))
   end
   
+  def using_soap
+    driver = wsdl_driver_factory.create_rpc_driver
+    response = yield(driver)
+    driver.reset_stream
+    
+    response
+  end
 
   # Encapsulates
   class SubscriberBounce
@@ -224,6 +231,12 @@ class CampaignMonitor
     end
   end
     
+  protected
+
+    def wsdl_driver_factory
+      SOAP::WSDLDriverFactory.new(&quot;#{api_url}?WSDL&quot;)
+    end
+  
 end
 
 # If libxml is installed, we use the FasterXmlSimple library, that provides most of the functionality of XmlSimple</diff>
      <filename>lib/campaign_monitor.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,16 +13,6 @@ class CampaignMonitor
       end      
     end
 
-    def wsdl_driver_factory
-      SOAP::WSDLDriverFactory.new(&quot;#{api_url}?WSDL&quot;)
-    end
-
-    def using_soap
-      driver = wsdl_driver_factory.create_rpc_driver
-      response = yield(driver)
-      driver.reset_stream
-    end
-
     def timestamp_format
       '%Y-%m-%d %H:%M:%S'
     end</diff>
      <filename>lib/campaign_monitor/helpers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -54,9 +54,9 @@ class CampaignMonitor
     # name            The subscriber's name.
     # custom_fields   A hash of field name =&gt; value pairs.
     def add_subscriber_with_custom_fields(email, name, custom_fields)
-      response = using_soap do |driver|
+      response = cm_client.using_soap do |driver|
         driver.addSubscriberWithCustomFields \
-            :ApiKey       =&gt; api_key,
+            :ApiKey       =&gt; cm_client.api_key,
             :ListID       =&gt; self.id,
             :Email        =&gt; email,
             :Name         =&gt; name,
@@ -70,9 +70,9 @@ class CampaignMonitor
     # name            The subscriber's name.
     # custom_fields   A hash of field name =&gt; value pairs.
     def add_and_resubscribe_with_custom_fields(email, name, custom_fields)      
-      response = using_soap do |driver|
+      response = cm_client.using_soap do |driver|
         driver.addAndResubscribeWithCustomFields \
-            :ApiKey       =&gt; api_key,
+            :ApiKey       =&gt; cm_client.api_key,
             :ListID       =&gt; self.id,
             :Email        =&gt; email,
             :Name         =&gt; name,</diff>
      <filename>lib/campaign_monitor/list.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>72d9c95d86cf10c6e1c4eb954960ac3357d0cedf</id>
    </parent>
  </parents>
  <author>
    <name>Jeremy Weiskotten</name>
    <email>jeremy.weiskotten@gmail.com</email>
  </author>
  <url>http://github.com/patientslikeme/campaign_monitor/commit/d64b4fea7c5a150b1e9cd98c64d8b799a825cb86</url>
  <id>d64b4fea7c5a150b1e9cd98c64d8b799a825cb86</id>
  <committed-date>2009-01-23T12:43:49-08:00</committed-date>
  <authored-date>2009-01-23T12:43:49-08:00</authored-date>
  <message>Fixed adding subscribers with custom fields</message>
  <tree>87dfcabdf8fae7f4af17b8392ad899d405c5b8e3</tree>
  <committer>
    <name>Jeremy Weiskotten</name>
    <email>jeremy.weiskotten@gmail.com</email>
  </committer>
</commit>
