module AdWords require 'adwords4r/v3/CreativeService' require 'soap/rpc/driver' class CreativeService < ::SOAP::RPC::Driver DefaultEndpointUrl = "https://adwords.google.com/api/adwords/v3/CreativeService" MappingRegistry = ::SOAP::Mapping::Registry.new Methods = [ [ "", "getAllCreatives", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getAllCreatives"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getAllCreativesResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getActiveCreatives", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getActiveCreatives"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getActiveCreativesResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "getCreative", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getCreative"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "getCreativeResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "addCreative", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "addCreative"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "addCreativeResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "addCreativeList", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "addCreativeList"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "addCreativeListResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "deleteCreative", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "deleteCreative"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "deleteCreativeResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "deleteCreativeList", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "deleteCreativeList"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "deleteCreativeListResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "activateCreative", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "activateCreative"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "activateCreativeResponse"], true] ], { :request_style => :document, :request_use => :literal, :response_style => :document, :response_use => :literal } ], [ "", "activateCreativeList", [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "activateCreativeList"], true], ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v3", "activateCreativeListResponse"], 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 end