lib/adwords4r/v13/CampaignServiceWrapper.rb in adwords4r-16.0.0 vs lib/adwords4r/v13/CampaignServiceWrapper.rb in adwords4r-17.0.0
- old
+ new
@@ -1,6 +1,6 @@
-# This file was automatically generated during the "rake generate" step of the
+# This file was automatically generated during the "rake generate" step of
# library setup.
require 'adwords4r/v13/CampaignServiceDriver.rb'
module AdWords
module V13
@@ -8,13 +8,22 @@
# Wrapper class for the v13 Campaign service.
# This class is automatically generated.
class CampaignServiceWrapper
- # Holds the AdWords::API object to which the wrapper belongs
+ # Holds the AdWords::API object to which the wrapper belongs.
attr_reader :api
+ # Holds a shortcut to the parent module.
+ # Use this to avoid typing the full class name when creating classes
+ # belonging to this service, e.g.
+ # service_object.module::ClassName
+ # instead of
+ # AdWords::V13::CampaignService::ClassName
+ # This will make it easier to migrate your code between API versions.
+ attr_reader :module
+
public
# Constructor for CampaignServiceWrapper.
#
# Args:
@@ -23,9 +32,10 @@
# - api: the AdWords::API object to which the wrapper belongs
#
def initialize(driver, api)
@driver = driver
@api = api
+ @module = AdWords::V13::CampaignService
end
# Calls the {addCampaign}[http://code.google.com/apis/adwords/docs/developer/CampaignService.html#addCampaign] method of the Campaign service.
# Check {the online documentation for this method}[http://code.google.com/apis/adwords/docs/developer/CampaignService.html#addCampaign].
#