require 'adwords4r/v3/AccountService' require 'soap/rpc/driver' class AccountService < ::SOAP::RPC::Driver DefaultEndpointUrl = "https://adwords.google.com/api/adwords/v3/AccountService" MappingRegistry = ::SOAP::Mapping::Registry.new Methods = [ [ "", "createAdWordsAccount", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "createAdWordsAccount"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "createAdWordsAccountResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "setLoginInfo", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setLoginInfo"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setLoginInfoResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getAccountCurrency", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getAccountCurrency"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getAccountCurrencyResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getCreditCard", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getCreditCard"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getCreditCardResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getBillingAddress", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getBillingAddress"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getBillingAddressResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "setCreditCard", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setCreditCard"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setCreditCardResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getDefaultAdsCoverage", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getDefaultAdsCoverage"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getDefaultAdsCoverageResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "setDefaultAdsCoverage", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setDefaultAdsCoverage"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setDefaultAdsCoverageResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getLanguagePreference", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getLanguagePreference"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getLanguagePreferenceResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "setLanguagePreference", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setLanguagePreference"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setLanguagePreferenceResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getEmailPromotionsPreferences", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getEmailPromotionsPreferences"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getEmailPromotionsPreferencesResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "setEmailPromotionsPreferences", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setEmailPromotionsPreferences"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setEmailPromotionsPreferencesResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getPrimaryBusinessCategory", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getPrimaryBusinessCategory"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getPrimaryBusinessCategoryResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "setPrimaryBusinessCategory", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setPrimaryBusinessCategory"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "setPrimaryBusinessCategoryResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getTermsAndConditions", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getTermsAndConditions"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getTermsAndConditionsResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getClientAccounts", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getClientAccounts"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getClientAccountsResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ] ] def initialize(endpoint_url = nil) endpoint_url ||= DefaultEndpointUrl super(endpoint_url, nil) self.mapping_registry = MappingRegistry init_methods end private def init_methods Methods.each do |definitions| opt = definitions.last if opt[:request_style] == :document add_document_operation(*definitions) else add_rpc_operation(*definitions) qname = definitions[0] name = definitions[2] if qname.name != name and qname.name.capitalize == name.capitalize ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg| __send__(name, *arg) end end end end end end