adwords_api/lib/adwords_api.rb
def soap_header_handler(auth_handler, version, header_ns, default_ns)
      auth_method = @config.read('authentication.method', :OAUTH2)
      handler_class = case auth_method
        when :OAUTH2, :OAUTH2_SERVICE_ACCOUNT
          AdsCommon::SavonHeaders::OAuthHeaderHandler
        else
          raise AdsCommon::Errors::AuthError,
              "Unknown auth method: %s" % auth_method
        end
      return handler_class.new(@credential_handler, auth_handler, header_ns,
                                  default_ns, version)
    end
def soap_header_handler(auth_handler, version, header_ns, default_ns)
      auth_method = @config.read('authentication.method', :OAUTH2)
      handler_class = case auth_method
        when :OAUTH2, :OAUTH2_SERVICE_ACCOUNT
          AdsCommon::SavonHeaders::OAuthHeaderHandler
        else
          raise AdsCommon::Errors::AuthError,
              "Unknown auth method: %s" % auth_method
        end
      return handler_class.new(@credential_handler, auth_handler, header_ns,
                                  default_ns, version)
    end
def soap_header_handler ( auth_handler , version , header_ns , default_ns ) auth_method = @config . read ( 'authentication.method' , :OAUTH2 ) handler_class = case auth_method when :OAUTH2 , :OAUTH2_SERVICE_ACCOUNT AdsCommon :: SavonHeaders :: OAuthHeaderHandler else raise AdsCommon :: Errors :: AuthError , "Unknown auth method: %s" % auth_method end return handler_class . new ( @credential_handler , auth_handler , header_ns , default_ns , version ) end
Retrieve correct soap_header_handler.

 Args:
 - auth_handler: instance of an AdsCommon::Auth::BaseHandler subclass to
   handle authentication
 - version: intended API version
 - header_ns: header namespace
 - default_ns: default namespace

 Returns:
 - SOAP header handler
Retrieve correct soap_header_handler .