Class: AdWords::V201003::BidLandscapeService::BidLandscapeServiceWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/adwords4r/v201003/BidLandscapeServiceWrapper.rb

Overview

Wrapper class for the v201003 BidLandscape service. This class is automatically generated.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(driver, api) ⇒ BidLandscapeServiceWrapper

Constructor for BidLandscapeServiceWrapper.

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/v201003/BidLandscapeServiceWrapper.rb', line 34

def initialize(driver, api)
  @driver = driver
  @api = api
  @module = AdWords::V201003::BidLandscapeService
end

Instance Attribute Details

#apiObject (readonly)

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



14
15
16
# File 'lib/adwords4r/v201003/BidLandscapeServiceWrapper.rb', line 14

def api
  @api
end

#moduleObject (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::V201003::BidLandscapeService::ClassName

This will make it easier to migrate your code between API versions.



23
24
25
# File 'lib/adwords4r/v201003/BidLandscapeServiceWrapper.rb', line 23

def module
  @module
end

Instance Method Details

#getBidLandscape(selector) ⇒ Object

Calls the getBidLandscape method of the BidLandscape service. Check the online documentation for this method.

Args:

  • selector: AdWords::V201003::BidLandscapeService::BidLandscapeSelector

Returns:

  • rval: SOAP::SOAPArray of AdWords::V201003::BidLandscapeService::BidLandscape

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/v201003/BidLandscapeServiceWrapper.rb', line 52

def getBidLandscape(selector)
  begin
    AdWords::Service.validate_param('selector',
        selector, AdWords::V201003::BidLandscapeService::BidLandscapeSelector)
    # Construct request object and make API call
    obj = AdWords::V201003::BidLandscapeService::GetBidLandscape.new(selector)
    return @driver.getBidLandscape(obj)
  rescue SOAP::FaultError => fault
    raise(AdWords::Error::create_specific_api_error(fault),
        "getBidLandscape Call Failed: " + fault.faultstring.to_s, caller)
  end
end