lib/sem4r/campaign/campaign_service.rb in sem4r-0.1.2 vs lib/sem4r/campaign/campaign_service.rb in sem4r-0.1.3
- old
+ new
@@ -1,5 +1,6 @@
+# -*- coding: utf-8 -*-
# -------------------------------------------------------------------
# Copyright (c) 2009-2010 Sem4r sem4ruby@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,23 +22,26 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# -------------------------------------------------------------------
module Sem4r
- class CampaignService
- include SoapCall
+ #
+ # @private
+ #
+ class CampaignService < Sem4rSoap::SoapServiceV2010
def initialize(connector)
@connector = connector
@service_namespace = "https://adwords.google.com/api/adwords/cm/v201008"
@header_namespace = @service_namespace
@sandbox_service_url = "https://adwords-sandbox.google.com/api/adwords/cm/v201008/CampaignService"
+ init(@header_namespace, @service_namespace)
end
- soap_call_v2010 :all, :mutate => false
- soap_call_v2010 :create
- soap_call_v2010 :delete
+ soap_call :all, :mutate => false
+ soap_call :create
+ soap_call :delete
private
def _all(statuses = [Campaign::ACTIVE, Campaign::PAUSED])
str = <<-EOFS