Wrapper class for the v13 AdGroup service. This class is automatically generated.

Methods
A
G
N
U
Attributes
[R] api

Holds the AdWords::API object to which the wrapper belongs

Class Public methods
new(driver, api)

Constructor for AdGroupServiceWrapper.

Args:

  • driver: SOAP::RPC::Driver object with the remote SOAP methods for this service
  • api: the AdWords::API object to which the wrapper belongs
# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 25
        def initialize(driver, api)
          @driver = driver
          @api = api
        end
Instance Public methods
addAdGroup(campaignID, newData)

Calls the addAdGroup method of the AdGroup service. Check the online documentation for this method.

Args:

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 43
        def addAdGroup(campaignID, newData)
          begin
            AdWords::Service.validate_param('campaignID',
                campaignID, SOAP::SOAPInt)
            AdWords::Service.validate_param('newData',
                newData, AdWords::V13::AdGroupService::AdGroup)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::AddAdGroup.new(campaignID, newData)
            return @driver.addAdGroup(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "addAdGroup Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
addAdGroupList(campaignID, newData)

Calls the addAdGroupList method of the AdGroup service. Check the online documentation for this method.

Args:

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 71
        def addAdGroupList(campaignID, newData)
          begin
            AdWords::Service.validate_param('campaignID',
                campaignID, SOAP::SOAPInt)
            AdWords::Service.validate_param('newData',
                newData, SOAP::SOAPArray)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::AddAdGroupList.new(campaignID, newData)
            return @driver.addAdGroupList(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "addAdGroupList Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getActiveAdGroups(campaignID)

Calls the getActiveAdGroups method of the AdGroup service. Check the online documentation for this method.

Args:

  • campaignID: SOAP::SOAPInt

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 98
        def getActiveAdGroups(campaignID)
          begin
            AdWords::Service.validate_param('campaignID',
                campaignID, SOAP::SOAPInt)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::GetActiveAdGroups.new(campaignID)
            return @driver.getActiveAdGroups(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getActiveAdGroups Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getAdGroup(adGroupId)

Calls the getAdGroup method of the AdGroup service. Check the online documentation for this method.

Args:

  • adGroupId: SOAP::SOAPLong

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 123
        def getAdGroup(adGroupId)
          begin
            AdWords::Service.validate_param('adGroupId',
                adGroupId, SOAP::SOAPLong)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::GetAdGroup.new(adGroupId)
            return @driver.getAdGroup(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getAdGroup Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getAdGroupList(adgroupIDs)

Calls the getAdGroupList method of the AdGroup service. Check the online documentation for this method.

Args:

  • adgroupIDs: SOAP::SOAPArray of SOAP::SOAPLong

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 148
        def getAdGroupList(adgroupIDs)
          begin
            AdWords::Service.validate_param('adgroupIDs',
                adgroupIDs, SOAP::SOAPArray)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::GetAdGroupList.new(adgroupIDs)
            return @driver.getAdGroupList(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getAdGroupList Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getAdGroupStats(campaignId, adGroupIds, startDay, endDay)

Calls the getAdGroupStats method of the AdGroup service. Check the online documentation for this method.

Args:

  • campaignId: SOAP::SOAPInt
  • adGroupIds: SOAP::SOAPArray of SOAP::SOAPLong
  • startDay: SOAP::SOAPDate
  • endDay: SOAP::SOAPDate

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 176
        def getAdGroupStats(campaignId, adGroupIds, startDay, endDay)
          begin
            AdWords::Service.validate_param('campaignId',
                campaignId, SOAP::SOAPInt)
            AdWords::Service.validate_param('adGroupIds',
                adGroupIds, SOAP::SOAPArray)
            AdWords::Service.validate_param('startDay',
                startDay, SOAP::SOAPDate)
            AdWords::Service.validate_param('endDay',
                endDay, SOAP::SOAPDate)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::GetAdGroupStats.new(campaignId, adGroupIds, startDay, endDay)
            return @driver.getAdGroupStats(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getAdGroupStats Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getAllAdGroups(campaignID)

Calls the getAllAdGroups method of the AdGroup service. Check the online documentation for this method.

Args:

  • campaignID: SOAP::SOAPInt

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 207
        def getAllAdGroups(campaignID)
          begin
            AdWords::Service.validate_param('campaignID',
                campaignID, SOAP::SOAPInt)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::GetAllAdGroups.new(campaignID)
            return @driver.getAllAdGroups(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getAllAdGroups Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
updateAdGroup(changedData)

Calls the updateAdGroup method of the AdGroup service. Check the online documentation for this method.

Args:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 229
        def updateAdGroup(changedData)
          begin
            AdWords::Service.validate_param('changedData',
                changedData, AdWords::V13::AdGroupService::AdGroup)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::UpdateAdGroup.new(changedData)
            return @driver.updateAdGroup(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "updateAdGroup Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
updateAdGroupList(changedData)

Calls the updateAdGroupList method of the AdGroup service. Check the online documentation for this method.

Args:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/AdGroupServiceWrapper.rb, line 251
        def updateAdGroupList(changedData)
          begin
            AdWords::Service.validate_param('changedData',
                changedData, SOAP::SOAPArray)
            # Construct request object and make API call
            obj = AdWords::V13::AdGroupService::UpdateAdGroupList.new(changedData)
            return @driver.updateAdGroupList(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "updateAdGroupList Call Failed: " + fault.faultstring.to_s, caller)
          end
        end