Class: AdWords::V200909::GeoLocationService::GeoLocationServiceWrapper
- Inherits:
-
Object
- Object
- AdWords::V200909::GeoLocationService::GeoLocationServiceWrapper
- Defined in:
- lib/adwords4r/v200909/GeoLocationServiceWrapper.rb
Overview
Wrapper class for the v200909 GeoLocation 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 GeoLocation service.
-
#initialize(driver, api) ⇒ GeoLocationServiceWrapper
constructor
Constructor for GeoLocationServiceWrapper.
Constructor Details
#initialize(driver, api) ⇒ GeoLocationServiceWrapper
Constructor for GeoLocationServiceWrapper.
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/GeoLocationServiceWrapper.rb', line 34 def initialize(driver, api) @driver = driver @api = api @module = AdWords::V200909::GeoLocationService end |
Instance Attribute Details
#api ⇒ Object (readonly)
Holds the AdWords::API object to which the wrapper belongs.
14 15 16 |
# File 'lib/adwords4r/v200909/GeoLocationServiceWrapper.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::GeoLocationService::ClassName
This will make it easier to migrate your code between API versions.
23 24 25 |
# File 'lib/adwords4r/v200909/GeoLocationServiceWrapper.rb', line 23 def module @module end |
Instance Method Details
#get(selector) ⇒ Object
Calls the get method of the GeoLocation service. Check the online documentation for this method.
Args:
-
selector: AdWords::V200909::GeoLocationService::GeoLocationSelector
Returns:
-
rval: SOAP::SOAPArray of AdWords::V200909::GeoLocationService::GeoLocation
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/GeoLocationServiceWrapper.rb', line 52 def get(selector) begin AdWords::Service.validate_param('selector', selector, AdWords::V200909::GeoLocationService::GeoLocationSelector) # Construct request object and make API call obj = AdWords::V200909::GeoLocationService::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 |