Class: AdWords::V200909::AdGroupAdService::AdGroupAdServiceWrapper
- Inherits:
-
Object
- Object
- AdWords::V200909::AdGroupAdService::AdGroupAdServiceWrapper
- Defined in:
- lib/adwords4r/v200909/AdGroupAdServiceWrapper.rb
Overview
Wrapper class for the v200909 AdGroupAd service. This class is automatically generated.
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Holds the AdWords::API object to which the wrapper belongs.
-
#module ⇒ Object
readonly
Holds a shortcut to the parent module.
Instance Method Summary collapse
-
#get(selector) ⇒ Object
Calls the get method of the AdGroupAd service.
-
#initialize(driver, api) ⇒ AdGroupAdServiceWrapper
constructor
Constructor for AdGroupAdServiceWrapper.
-
#mutate(operations) ⇒ Object
Calls the mutate method of the AdGroupAd service.
Constructor Details
#initialize(driver, api) ⇒ AdGroupAdServiceWrapper
Constructor for AdGroupAdServiceWrapper.
Args:
-
driver: SOAP::RPC::Driver object with the remote SOAP methods for this service
-
api: the AdWords::API object to which the wrapper belongs
34 35 36 37 38 |
# File 'lib/adwords4r/v200909/AdGroupAdServiceWrapper.rb', line 34 def initialize(driver, api) @driver = driver @api = api @module = AdWords::V200909::AdGroupAdService end |
Instance Attribute Details
#api ⇒ Object (readonly)
Holds the AdWords::API object to which the wrapper belongs.
14 15 16 |
# File 'lib/adwords4r/v200909/AdGroupAdServiceWrapper.rb', line 14 def api @api end |
#module ⇒ Object (readonly)
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::V200909::AdGroupAdService::ClassName
This will make it easier to migrate your code between API versions.
23 24 25 |
# File 'lib/adwords4r/v200909/AdGroupAdServiceWrapper.rb', line 23 def module @module end |
Instance Method Details
#get(selector) ⇒ Object
Calls the get method of the AdGroupAd service. Check the online documentation for this method.
Args:
-
selector: AdWords::V200909::AdGroupAdService::AdGroupAdSelector
Returns:
-
rval: AdWords::V200909::AdGroupAdService::AdGroupAdPage
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/adwords4r/v200909/AdGroupAdServiceWrapper.rb', line 52 def get(selector) begin AdWords::Service.validate_param('selector', selector, AdWords::V200909::AdGroupAdService::AdGroupAdSelector) # Construct request object and make API call obj = AdWords::V200909::AdGroupAdService::Get.new(selector) return @driver.get(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "get Call Failed: " + fault.faultstring.to_s, caller) end end |
#mutate(operations) ⇒ Object
Calls the mutate method of the AdGroupAd service. Check the online documentation for this method.
Args:
-
operations: SOAP::SOAPArray of AdWords::V200909::AdGroupAdService::AdGroupAdOperation
Returns:
-
rval: AdWords::V200909::AdGroupAdService::AdGroupAdReturnValue
Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/adwords4r/v200909/AdGroupAdServiceWrapper.rb', line 77 def mutate(operations) begin AdWords::Service.validate_param('operations', operations, SOAP::SOAPArray) # Construct request object and make API call obj = AdWords::V200909::AdGroupAdService::Mutate.new(operations) return @driver.mutate(obj) rescue SOAP::FaultError => fault raise(AdWords::Error::create_specific_api_error(fault), "mutate Call Failed: " + fault.faultstring.to_s, caller) end end |