google-adwords-api 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/Rakefile +1 -1
  2. data/examples/v201101/add_conversion.rb +97 -0
  3. data/examples/v201101/add_user_list.rb +28 -2
  4. data/examples/v201101/get_all_conversions.rb +88 -0
  5. data/examples/v201101/get_keyword_opportunities.rb +103 -0
  6. data/examples/v201101/update_conversion.rb +96 -0
  7. data/lib/adwords_api/api_config.rb +6 -3
  8. data/lib/adwords_api/errors.rb +4 -1
  9. data/lib/adwords_api/extensions.rb +1 -1
  10. data/lib/adwords_api/v13/AccountServiceDriver.rb +5 -5
  11. data/lib/adwords_api/v13/ReportServiceDriver.rb +7 -7
  12. data/lib/adwords_api/v13/TrafficEstimatorServiceDriver.rb +4 -4
  13. data/lib/adwords_api/v200909/AdExtensionOverrideServiceDriver.rb +2 -2
  14. data/lib/adwords_api/v200909/AdGroupAdServiceDriver.rb +2 -2
  15. data/lib/adwords_api/v200909/AdGroupCriterionService.rb +506 -506
  16. data/lib/adwords_api/v200909/AdGroupCriterionServiceDriver.rb +2 -2
  17. data/lib/adwords_api/v200909/AdGroupCriterionServiceMappingRegistry.rb +428 -428
  18. data/lib/adwords_api/v200909/AdGroupServiceDriver.rb +2 -2
  19. data/lib/adwords_api/v200909/AdParamServiceDriver.rb +2 -2
  20. data/lib/adwords_api/v200909/BulkMutateJobServiceDriver.rb +2 -2
  21. data/lib/adwords_api/v200909/CampaignAdExtensionServiceDriver.rb +2 -2
  22. data/lib/adwords_api/v200909/CampaignCriterionService.rb +133 -133
  23. data/lib/adwords_api/v200909/CampaignCriterionServiceDriver.rb +2 -2
  24. data/lib/adwords_api/v200909/CampaignCriterionServiceMappingRegistry.rb +184 -184
  25. data/lib/adwords_api/v200909/CampaignServiceDriver.rb +2 -2
  26. data/lib/adwords_api/v200909/CampaignTargetServiceDriver.rb +2 -2
  27. data/lib/adwords_api/v200909/GeoLocationServiceDriver.rb +1 -1
  28. data/lib/adwords_api/v200909/InfoServiceDriver.rb +1 -1
  29. data/lib/adwords_api/v200909/TargetingIdeaService.rb +907 -907
  30. data/lib/adwords_api/v200909/TargetingIdeaServiceDriver.rb +2 -2
  31. data/lib/adwords_api/v200909/TargetingIdeaServiceMappingRegistry.rb +384 -384
  32. data/lib/adwords_api/v201003/AdExtensionOverrideServiceDriver.rb +2 -2
  33. data/lib/adwords_api/v201003/AdGroupAdServiceDriver.rb +2 -2
  34. data/lib/adwords_api/v201003/AdGroupCriterionService.rb +527 -527
  35. data/lib/adwords_api/v201003/AdGroupCriterionServiceDriver.rb +2 -2
  36. data/lib/adwords_api/v201003/AdGroupCriterionServiceMappingRegistry.rb +469 -469
  37. data/lib/adwords_api/v201003/AdGroupServiceDriver.rb +2 -2
  38. data/lib/adwords_api/v201003/AdParamServiceDriver.rb +2 -2
  39. data/lib/adwords_api/v201003/BidLandscapeServiceDriver.rb +1 -1
  40. data/lib/adwords_api/v201003/BulkMutateJobServiceDriver.rb +2 -2
  41. data/lib/adwords_api/v201003/CampaignAdExtensionServiceDriver.rb +2 -2
  42. data/lib/adwords_api/v201003/CampaignCriterionService.rb +133 -133
  43. data/lib/adwords_api/v201003/CampaignCriterionServiceDriver.rb +2 -2
  44. data/lib/adwords_api/v201003/CampaignCriterionServiceMappingRegistry.rb +186 -186
  45. data/lib/adwords_api/v201003/CampaignServiceDriver.rb +2 -2
  46. data/lib/adwords_api/v201003/CampaignTargetServiceDriver.rb +2 -2
  47. data/lib/adwords_api/v201003/GeoLocationServiceDriver.rb +1 -1
  48. data/lib/adwords_api/v201003/InfoServiceDriver.rb +1 -1
  49. data/lib/adwords_api/v201003/MediaServiceDriver.rb +2 -2
  50. data/lib/adwords_api/v201003/ReportDefinitionServiceDriver.rb +3 -3
  51. data/lib/adwords_api/v201003/TargetingIdeaService.rb +1304 -1304
  52. data/lib/adwords_api/v201003/TargetingIdeaServiceDriver.rb +2 -2
  53. data/lib/adwords_api/v201003/TargetingIdeaServiceMappingRegistry.rb +401 -401
  54. data/lib/adwords_api/v201008/AdExtensionOverrideServiceDriver.rb +2 -2
  55. data/lib/adwords_api/v201008/AdGroupAdServiceDriver.rb +2 -2
  56. data/lib/adwords_api/v201008/AdGroupCriterionService.rb +598 -598
  57. data/lib/adwords_api/v201008/AdGroupCriterionServiceDriver.rb +2 -2
  58. data/lib/adwords_api/v201008/AdGroupCriterionServiceMappingRegistry.rb +680 -680
  59. data/lib/adwords_api/v201008/AdGroupServiceDriver.rb +2 -2
  60. data/lib/adwords_api/v201008/AdParamServiceDriver.rb +2 -2
  61. data/lib/adwords_api/v201008/AlertServiceDriver.rb +1 -1
  62. data/lib/adwords_api/v201008/BidLandscapeServiceDriver.rb +1 -1
  63. data/lib/adwords_api/v201008/BulkMutateJobServiceDriver.rb +2 -2
  64. data/lib/adwords_api/v201008/CampaignAdExtensionServiceDriver.rb +2 -2
  65. data/lib/adwords_api/v201008/CampaignCriterionService.rb +178 -178
  66. data/lib/adwords_api/v201008/CampaignCriterionServiceDriver.rb +2 -2
  67. data/lib/adwords_api/v201008/CampaignCriterionServiceMappingRegistry.rb +228 -228
  68. data/lib/adwords_api/v201008/CampaignServiceDriver.rb +2 -2
  69. data/lib/adwords_api/v201008/CampaignTargetServiceDriver.rb +2 -2
  70. data/lib/adwords_api/v201008/CustomerSyncServiceDriver.rb +1 -1
  71. data/lib/adwords_api/v201008/ExperimentServiceDriver.rb +2 -2
  72. data/lib/adwords_api/v201008/GeoLocationServiceDriver.rb +1 -1
  73. data/lib/adwords_api/v201008/InfoServiceDriver.rb +1 -1
  74. data/lib/adwords_api/v201008/MediaServiceDriver.rb +2 -2
  75. data/lib/adwords_api/v201008/ReportDefinitionServiceDriver.rb +3 -3
  76. data/lib/adwords_api/v201008/ServicedAccountServiceDriver.rb +1 -1
  77. data/lib/adwords_api/v201008/TargetingIdeaService.rb +1459 -1459
  78. data/lib/adwords_api/v201008/TargetingIdeaServiceDriver.rb +2 -2
  79. data/lib/adwords_api/v201008/TargetingIdeaServiceMappingRegistry.rb +447 -447
  80. data/lib/adwords_api/v201008/TrafficEstimatorService.rb +855 -855
  81. data/lib/adwords_api/v201008/TrafficEstimatorServiceDriver.rb +1 -1
  82. data/lib/adwords_api/v201008/TrafficEstimatorServiceMappingRegistry.rb +126 -126
  83. data/lib/adwords_api/v201008/UserListServiceDriver.rb +2 -2
  84. data/lib/adwords_api/v201101/AdExtensionOverrideServiceDriver.rb +2 -2
  85. data/lib/adwords_api/v201101/AdGroupAdService.rb +2 -0
  86. data/lib/adwords_api/v201101/AdGroupAdServiceDriver.rb +2 -2
  87. data/lib/adwords_api/v201101/AdGroupCriterionService.rb +700 -700
  88. data/lib/adwords_api/v201101/AdGroupCriterionServiceDriver.rb +2 -2
  89. data/lib/adwords_api/v201101/AdGroupCriterionServiceMappingRegistry.rb +670 -670
  90. data/lib/adwords_api/v201101/AdGroupServiceDriver.rb +2 -2
  91. data/lib/adwords_api/v201101/AdParamServiceDriver.rb +2 -2
  92. data/lib/adwords_api/v201101/AlertServiceDriver.rb +1 -1
  93. data/lib/adwords_api/v201101/BulkMutateJobService.rb +2 -0
  94. data/lib/adwords_api/v201101/BulkMutateJobServiceDriver.rb +2 -2
  95. data/lib/adwords_api/v201101/BulkOpportunityService.rb +1367 -0
  96. data/lib/adwords_api/v201101/BulkOpportunityServiceDriver.rb +55 -0
  97. data/lib/adwords_api/v201101/BulkOpportunityServiceMappingRegistry.rb +1668 -0
  98. data/lib/adwords_api/v201101/BulkOpportunityServiceWrapper.rb +303 -0
  99. data/lib/adwords_api/v201101/CampaignAdExtensionServiceDriver.rb +2 -2
  100. data/lib/adwords_api/v201101/CampaignCriterionService.rb +216 -216
  101. data/lib/adwords_api/v201101/CampaignCriterionServiceDriver.rb +2 -2
  102. data/lib/adwords_api/v201101/CampaignCriterionServiceMappingRegistry.rb +234 -234
  103. data/lib/adwords_api/v201101/CampaignServiceDriver.rb +2 -2
  104. data/lib/adwords_api/v201101/CampaignTargetServiceDriver.rb +2 -2
  105. data/lib/adwords_api/v201101/ConversionTrackerService.rb +1105 -0
  106. data/lib/adwords_api/v201101/ConversionTrackerServiceDriver.rb +63 -0
  107. data/lib/adwords_api/v201101/ConversionTrackerServiceMappingRegistry.rb +1161 -0
  108. data/lib/adwords_api/v201101/ConversionTrackerServiceWrapper.rb +332 -0
  109. data/lib/adwords_api/v201101/CustomerSyncServiceDriver.rb +1 -1
  110. data/lib/adwords_api/v201101/DataServiceDriver.rb +2 -2
  111. data/lib/adwords_api/v201101/ExperimentServiceDriver.rb +2 -2
  112. data/lib/adwords_api/v201101/GeoLocationServiceDriver.rb +1 -1
  113. data/lib/adwords_api/v201101/InfoServiceDriver.rb +1 -1
  114. data/lib/adwords_api/v201101/MediaServiceDriver.rb +2 -2
  115. data/lib/adwords_api/v201101/ReportDefinitionServiceDriver.rb +3 -3
  116. data/lib/adwords_api/v201101/ReportDefinitionServiceWrapper.rb +14 -0
  117. data/lib/adwords_api/v201101/ServicedAccountServiceDriver.rb +1 -1
  118. data/lib/adwords_api/v201101/TargetingIdeaService.rb +1490 -1490
  119. data/lib/adwords_api/v201101/TargetingIdeaServiceDriver.rb +2 -2
  120. data/lib/adwords_api/v201101/TargetingIdeaServiceMappingRegistry.rb +507 -507
  121. data/lib/adwords_api/v201101/TrafficEstimatorService.rb +841 -841
  122. data/lib/adwords_api/v201101/TrafficEstimatorServiceDriver.rb +1 -1
  123. data/lib/adwords_api/v201101/TrafficEstimatorServiceMappingRegistry.rb +126 -126
  124. data/lib/adwords_api/v201101/UserListServiceDriver.rb +2 -2
  125. metadata +17 -5
@@ -0,0 +1,303 @@
1
+ # This file was automatically generated during the "rake generate" step of
2
+ # library setup.
3
+ require 'adwords_api/v201101/BulkOpportunityServiceDriver.rb'
4
+
5
+ module AdwordsApi
6
+ module V201101
7
+ module BulkOpportunityService
8
+
9
+ # Wrapper class for the v201101 BulkOpportunityService service.
10
+ # This class is automatically generated.
11
+ class BulkOpportunityServiceWrapper
12
+
13
+ # Holds the API object to which the wrapper belongs.
14
+ attr_reader :api
15
+
16
+ # Version and service utility fields.
17
+ attr_reader :version, :service
18
+
19
+ REGISTRY = AdwordsApi::V201101::BulkOpportunityService::DefaultMappingRegistry::LiteralRegistry
20
+ # This takes advantage of the code generated by soap4r to get the
21
+ # correct namespace for a given service. It accesses one of the fields
22
+ # in the description of the service's methods, which indicates the
23
+ # namespace.
24
+ # Since we're using a fixed version of soap4r (1.5.8), and this is
25
+ # automatically generated as part of the stub generation, it will
26
+ # always point to what we want.
27
+ NAMESPACE = 'https://adwords.google.com/api/adwords/o/v201101'
28
+
29
+ # Holds a shortcut to the parent module.
30
+ # Use this to avoid typing the full class name when creating classes
31
+ # belonging to this service, e.g.
32
+ # service_object.module::ClassName
33
+ # instead of
34
+ # AdwordsApi::V201101::BulkOpportunityService::ClassName
35
+ # This will make it easier to migrate your code between API versions.
36
+ attr_reader :module
37
+
38
+ public
39
+
40
+ # Constructor for BulkOpportunityServiceWrapper.
41
+ #
42
+ # Args:
43
+ # - driver: SOAP::RPC::Driver object with the remote SOAP methods for
44
+ # this service
45
+ # - api: the API object to which the wrapper belongs
46
+ #
47
+ def initialize(driver, api)
48
+ @driver = driver
49
+ @api = api
50
+ @module = AdwordsApi::V201101::BulkOpportunityService
51
+ @version = :v201101
52
+ @service = :BulkOpportunityService
53
+ end
54
+
55
+ # Returns the namespace for this service.
56
+ def namespace
57
+ return NAMESPACE
58
+ end
59
+
60
+ private
61
+
62
+ # Converts from underscore_separated names to camelCase names.
63
+ #
64
+ # Args:
65
+ # - text: the text to be converted
66
+ #
67
+ def camel_case(text)
68
+ text.gsub(/_\w/) {|match| match[1..-1].upcase}
69
+ end
70
+
71
+ # Converts from camelCase names to underscore_separated names.
72
+ #
73
+ # Args:
74
+ # - text: the text to be converted
75
+ #
76
+ def underscore(text)
77
+ text.gsub(/[a-z0-9][A-Z]/) do |match|
78
+ match[0,1] + '_' + match[1,1].downcase
79
+ end
80
+ end
81
+
82
+ # Validates whether an object is of the correct type.
83
+ # This method is invoked by the hash to object converter during
84
+ # runtime to check the type validity of every object.
85
+ #
86
+ # Args:
87
+ # - object: the hash "object" being evaluated
88
+ # - type: the expected type (the class object itself)
89
+ #
90
+ # Returns:
91
+ # nil, upon success
92
+ #
93
+ # Raises:
94
+ # - ArgumentError: in case of an unexpected type
95
+ #
96
+ def validate_object(object, type)
97
+ return nil if object.is_a? type
98
+
99
+ wsdl_type_obj = type.new
100
+
101
+ if object.is_a? Hash
102
+ xsi_type = object[:xsi_type] or object['xsi_type']
103
+ if xsi_type
104
+ begin
105
+ subtype = @module.class_eval(xsi_type)
106
+ user_type_obj = subtype.new
107
+ rescue
108
+ raise ArgumentError, "Specified xsi_type '" + xsi_type +
109
+ "' is unknown"
110
+ end
111
+ unless user_type_obj.is_a? type
112
+ raise ArgumentError, "Specified xsi_type '" + xsi_type +
113
+ "' is not a subclass of " + type.to_s
114
+ end
115
+ else
116
+ object.each do |key, value|
117
+ if key.to_s != 'xsi_type'
118
+ if !wsdl_type_obj.respond_to?(camel_case(key.to_s).to_sym)
119
+ raise ArgumentError, "Unknown property '" + key.to_s +
120
+ "' for type " + type.to_s
121
+ end
122
+ end
123
+ end
124
+ end
125
+ end
126
+ return nil
127
+ end
128
+
129
+ # Sets a property on a real (soap4r-generated) object.
130
+ #
131
+ # Args:
132
+ # - object: the object being modified
133
+ # - property: the property being set
134
+ # - value: the value it's being set to
135
+ #
136
+ def set_object_property(object, property, value)
137
+ begin
138
+ object.send(property.to_s + '=', value)
139
+ rescue
140
+ object_class = object.class.name.split('::').last
141
+ error = AdsCommon::Errors::MissingPropertyError.new(
142
+ property, object_class)
143
+ message = "'Missing property `" + property.to_s +
144
+ "' for object class `" + object_class + "'"
145
+ raise(error, message)
146
+ end
147
+ end
148
+
149
+ public
150
+
151
+ # Converts dynamic objects (property hashes) into real soap4r objects.
152
+ # This is meant to be called when setting properties on a class, so
153
+ # the method receives an optional parameter specifying the class and
154
+ # property. This way, it's possible to determine the default type for
155
+ # the object if none is provided.
156
+ #
157
+ # Args:
158
+ # - object: the object being converted
159
+ # - parent_class: the class whose property is being set
160
+ # - property: the property being set
161
+ #
162
+ def convert_to_object(object, parent_class = nil, property = nil)
163
+ property = camel_case(property.to_s) if property
164
+ if object.is_a? Hash
165
+ # Process a hash.
166
+ specified_class = object[:xsi_type] or object['xsi_type']
167
+ default_class = nil
168
+ # Determine default class for this object, given the property
169
+ # being set.
170
+ if parent_class and property
171
+ parent = REGISTRY.schema_definition_from_class(parent_class)
172
+ element = parent.elements.entries.find do |entry|
173
+ entry.varname.to_s == property.to_s
174
+ end
175
+ default_class = element.mapped_class if element
176
+ end
177
+ validate_object(object, default_class)
178
+ real_class = nil
179
+ if specified_class
180
+ real_class = @module.class_eval(specified_class)
181
+ else
182
+ real_class = default_class
183
+ end
184
+ # Instance real object.
185
+ real_object = real_class.new
186
+ # Set each of its properties.
187
+ object.each do |entry, value|
188
+ entry = entry.to_s
189
+ unless entry == 'xsi_type'
190
+ if @api.config.read('service.use_ruby_names')
191
+ entry = camel_case(entry)
192
+ end
193
+ if value.is_a? Hash
194
+ # Recurse.
195
+ set_object_property(real_object, entry,
196
+ convert_to_object(value, real_class, entry))
197
+ elsif value.is_a? Array
198
+ set_object_property(real_object, entry,
199
+ value.map do |item|
200
+ # Recurse.
201
+ convert_to_object(item, real_class, entry)
202
+ end
203
+ )
204
+ else
205
+ set_object_property(real_object, entry, value)
206
+ end
207
+ end
208
+ end
209
+ return real_object
210
+ elsif object.is_a? Array
211
+ # Process an array
212
+ return object.map do |entry|
213
+ # Recurse.
214
+ convert_to_object(entry, parent_class, property)
215
+ end
216
+ else
217
+ return object
218
+ end
219
+ end
220
+
221
+ # Converts real soap4r objects into dynamic ones (property hashes).
222
+ # This is meant to be called for return objects of remote calls.
223
+ #
224
+ # Args:
225
+ # - object: the object being converted
226
+ #
227
+ def convert_from_object(object)
228
+ if object.class.name =~
229
+ /AdwordsApi::V201101::\w+::\w+/
230
+ # Handle soap4r object
231
+ object_class = REGISTRY.schema_definition_from_class(object.class)
232
+ if object_class.elements and !object_class.elements.entries.empty?
233
+ # Process complex object.
234
+ hash = {}
235
+ hash[:xsi_type] = object.class.name.split('::').last
236
+ object_class.elements.entries.each do |entry|
237
+ property = entry.varname.to_s
238
+ if object.respond_to? property and !property.include?('_Type')
239
+ value = object.send(property)
240
+ property_name = nil
241
+ if @api.config.read('service.use_ruby_names')
242
+ property_name = underscore(property).to_sym
243
+ else
244
+ property_name = property.to_sym
245
+ end
246
+ # Recurse.
247
+ hash[property_name] = convert_from_object(value) if value
248
+ end
249
+ end
250
+ return hash
251
+ else
252
+ # Process simple object.
253
+ parent = object.class.superclass
254
+ return parent.new(object)
255
+ end
256
+ elsif object.is_a? Array
257
+ # Handle arrays
258
+ return object.map do |entry|
259
+ # Recurse.
260
+ convert_from_object(entry)
261
+ end
262
+ else
263
+ # Handle native objects
264
+ return object
265
+ end
266
+ end
267
+
268
+
269
+ public
270
+
271
+ # Calls the {get}[http://code.google.com/apis/adwords/docs/reference/v201101/BulkOpportunityService.html#get] method of the BulkOpportunityService service.
272
+ # Check {the online documentation for this method}[http://code.google.com/apis/adwords/docs/reference/v201101/BulkOpportunityService.html#get].
273
+ #
274
+ # Args:
275
+ # - selector: AdwordsApi::V201101::BulkOpportunityService::BulkOpportunitySelector
276
+ #
277
+ # Returns:
278
+ # - rval: AdwordsApi::V201101::BulkOpportunityService::BulkOpportunityPage
279
+ #
280
+ # Raises:
281
+ # Error::ApiError (or a subclass thereof) if a SOAP fault occurs.
282
+ #
283
+ def get(selector)
284
+ begin
285
+ arg_array = []
286
+ validate_object(selector, AdwordsApi::V201101::BulkOpportunityService::BulkOpportunitySelector)
287
+ arg_array << convert_to_object(selector, AdwordsApi::V201101::BulkOpportunityService::Get,
288
+ 'selector')
289
+ # Construct request object and make API call
290
+ obj = AdwordsApi::V201101::BulkOpportunityService::Get.new(*arg_array)
291
+ reply = convert_from_object(@driver.get(obj))
292
+ reply = reply[:rval] if reply.include?(:rval)
293
+ return reply
294
+ rescue SOAP::FaultError => fault
295
+ raise AdwordsApi::Errors.create_api_exception(fault,
296
+ self)
297
+ end
298
+ end
299
+
300
+ end
301
+ end
302
+ end
303
+ end
@@ -16,7 +16,7 @@ class CampaignAdExtensionServiceInterface < ::SOAP::RPC::Driver
16
16
  ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/cm/v201101", "getResponse"]] ],
17
17
  { :request_style => :document, :request_use => :literal,
18
18
  :response_style => :document, :response_use => :literal,
19
- :faults => {"AdwordsApi::V201101::CampaignAdExtensionService::ApiException"=>{:encodingstyle=>"document", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/cm/v201101", :use=>"literal", :name=>"ApiException"}} }
19
+ :faults => {"AdwordsApi::V201101::CampaignAdExtensionService::ApiException"=>{:encodingstyle=>"document", :use=>"literal", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/cm/v201101", :name=>"ApiException"}} }
20
20
  ],
21
21
  [ "",
22
22
  "mutate",
@@ -24,7 +24,7 @@ class CampaignAdExtensionServiceInterface < ::SOAP::RPC::Driver
24
24
  ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/cm/v201101", "mutateResponse"]] ],
25
25
  { :request_style => :document, :request_use => :literal,
26
26
  :response_style => :document, :response_use => :literal,
27
- :faults => {"AdwordsApi::V201101::CampaignAdExtensionService::ApiException"=>{:encodingstyle=>"document", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/cm/v201101", :use=>"literal", :name=>"ApiException"}} }
27
+ :faults => {"AdwordsApi::V201101::CampaignAdExtensionService::ApiException"=>{:encodingstyle=>"document", :use=>"literal", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/cm/v201101", :name=>"ApiException"}} }
28
28
  ]
29
29
  ]
30
30
 
@@ -3,153 +3,6 @@ require 'xsd/qname'
3
3
  module AdwordsApi; module V201101; module CampaignCriterionService
4
4
 
5
5
 
6
- # DateRange
7
- # - min - SOAP::SOAPString
8
- # - max - SOAP::SOAPString
9
- class DateRange
10
- attr_accessor :min
11
- attr_accessor :max
12
-
13
- def initialize(min = nil, max = nil)
14
- @min = min
15
- @max = max
16
- end
17
- end
18
-
19
- # OrderBy
20
- # - field - SOAP::SOAPString
21
- # - sortOrder - AdwordsApi::V201101::CampaignCriterionService::SortOrder
22
- class OrderBy
23
- attr_accessor :field
24
- attr_accessor :sortOrder
25
-
26
- def initialize(field = nil, sortOrder = nil)
27
- @field = field
28
- @sortOrder = sortOrder
29
- end
30
- end
31
-
32
- # Paging
33
- # - startIndex - SOAP::SOAPInt
34
- # - numberResults - SOAP::SOAPInt
35
- class Paging
36
- attr_accessor :startIndex
37
- attr_accessor :numberResults
38
-
39
- def initialize(startIndex = nil, numberResults = nil)
40
- @startIndex = startIndex
41
- @numberResults = numberResults
42
- end
43
- end
44
-
45
- # Predicate
46
- # - field - SOAP::SOAPString
47
- # - operator - AdwordsApi::V201101::CampaignCriterionService::PredicateOperator
48
- # - values - SOAP::SOAPString
49
- class Predicate
50
- attr_accessor :field
51
- attr_accessor :operator
52
- attr_accessor :values
53
-
54
- def initialize(field = nil, operator = nil, values = [])
55
- @field = field
56
- @operator = operator
57
- @values = values
58
- end
59
- end
60
-
61
- # ProductConditionOperand
62
- # - operand - SOAP::SOAPString
63
- class ProductConditionOperand
64
- attr_accessor :operand
65
-
66
- def initialize(operand = nil)
67
- @operand = operand
68
- end
69
- end
70
-
71
- # SoapHeader
72
- # - authToken - SOAP::SOAPString
73
- # - clientCustomerId - SOAP::SOAPString
74
- # - clientEmail - SOAP::SOAPString
75
- # - developerToken - SOAP::SOAPString
76
- # - userAgent - SOAP::SOAPString
77
- # - validateOnly - SOAP::SOAPBoolean
78
- # - partialFailure - SOAP::SOAPBoolean
79
- class SoapHeader
80
- attr_accessor :authToken
81
- attr_accessor :clientCustomerId
82
- attr_accessor :clientEmail
83
- attr_accessor :developerToken
84
- attr_accessor :userAgent
85
- attr_accessor :validateOnly
86
- attr_accessor :partialFailure
87
-
88
- def initialize(authToken = nil, clientCustomerId = nil, clientEmail = nil, developerToken = nil, userAgent = nil, validateOnly = nil, partialFailure = nil)
89
- @authToken = authToken
90
- @clientCustomerId = clientCustomerId
91
- @clientEmail = clientEmail
92
- @developerToken = developerToken
93
- @userAgent = userAgent
94
- @validateOnly = validateOnly
95
- @partialFailure = partialFailure
96
- end
97
- end
98
-
99
- # SoapResponseHeader
100
- # - requestId - SOAP::SOAPString
101
- # - operations - SOAP::SOAPLong
102
- # - responseTime - SOAP::SOAPLong
103
- # - units - SOAP::SOAPLong
104
- class SoapResponseHeader
105
- attr_accessor :requestId
106
- attr_accessor :operations
107
- attr_accessor :responseTime
108
- attr_accessor :units
109
-
110
- def initialize(requestId = nil, operations = nil, responseTime = nil, units = nil)
111
- @requestId = requestId
112
- @operations = operations
113
- @responseTime = responseTime
114
- @units = units
115
- end
116
- end
117
-
118
- # ProductCondition
119
- # - argument - SOAP::SOAPString
120
- # - operand - AdwordsApi::V201101::CampaignCriterionService::ProductConditionOperand
121
- class ProductCondition
122
- attr_accessor :argument
123
- attr_accessor :operand
124
-
125
- def initialize(argument = nil, operand = nil)
126
- @argument = argument
127
- @operand = operand
128
- end
129
- end
130
-
131
- # Selector
132
- # - fields - SOAP::SOAPString
133
- # - predicates - AdwordsApi::V201101::CampaignCriterionService::Predicate
134
- # - dateRange - AdwordsApi::V201101::CampaignCriterionService::DateRange
135
- # - ordering - AdwordsApi::V201101::CampaignCriterionService::OrderBy
136
- # - paging - AdwordsApi::V201101::CampaignCriterionService::Paging
137
- class Selector
138
- attr_accessor :fields
139
- attr_accessor :predicates
140
- attr_accessor :dateRange
141
- attr_accessor :ordering
142
- attr_accessor :paging
143
-
144
- def initialize(fields = [], predicates = [], dateRange = nil, ordering = [], paging = nil)
145
- @fields = fields
146
- @predicates = predicates
147
- @dateRange = dateRange
148
- @ordering = ordering
149
- @paging = paging
150
- end
151
- end
152
-
153
6
  # ApiError
154
7
  # abstract
155
8
  # - fieldPath - SOAP::SOAPString
@@ -280,6 +133,28 @@ class CriterionError < ApiError
280
133
  end
281
134
  end
282
135
 
136
+ # DatabaseError
137
+ # - fieldPath - SOAP::SOAPString
138
+ # - trigger - SOAP::SOAPString
139
+ # - errorString - SOAP::SOAPString
140
+ # - apiError_Type - SOAP::SOAPString
141
+ # - reason - AdwordsApi::V201101::CampaignCriterionService::DatabaseErrorReason
142
+ class DatabaseError < ApiError
143
+ attr_accessor :fieldPath
144
+ attr_accessor :trigger
145
+ attr_accessor :errorString
146
+ attr_accessor :apiError_Type
147
+ attr_accessor :reason
148
+
149
+ def initialize(fieldPath = nil, trigger = nil, errorString = nil, apiError_Type = nil, reason = nil)
150
+ @fieldPath = fieldPath
151
+ @trigger = trigger
152
+ @errorString = errorString
153
+ @apiError_Type = apiError_Type
154
+ @reason = reason
155
+ end
156
+ end
157
+
283
158
  # DistinctError
284
159
  # - fieldPath - SOAP::SOAPString
285
160
  # - trigger - SOAP::SOAPString
@@ -744,28 +619,6 @@ class SizeLimitError < ApiError
744
619
  end
745
620
  end
746
621
 
747
- # DatabaseError
748
- # - fieldPath - SOAP::SOAPString
749
- # - trigger - SOAP::SOAPString
750
- # - errorString - SOAP::SOAPString
751
- # - apiError_Type - SOAP::SOAPString
752
- # - reason - AdwordsApi::V201101::CampaignCriterionService::DatabaseErrorReason
753
- class DatabaseError < ApiError
754
- attr_accessor :fieldPath
755
- attr_accessor :trigger
756
- attr_accessor :errorString
757
- attr_accessor :apiError_Type
758
- attr_accessor :reason
759
-
760
- def initialize(fieldPath = nil, trigger = nil, errorString = nil, apiError_Type = nil, reason = nil)
761
- @fieldPath = fieldPath
762
- @trigger = trigger
763
- @errorString = errorString
764
- @apiError_Type = apiError_Type
765
- @reason = reason
766
- end
767
- end
768
-
769
622
  # ApplicationException
770
623
  # - message - SOAP::SOAPString
771
624
  # - applicationException_Type - SOAP::SOAPString
@@ -795,6 +648,38 @@ class ApiException < ApplicationException
795
648
  end
796
649
  end
797
650
 
651
+ # CampaignCriterion
652
+ # - campaignId - SOAP::SOAPLong
653
+ # - criterion - AdwordsApi::V201101::CampaignCriterionService::Criterion
654
+ # - campaignCriterion_Type - SOAP::SOAPString
655
+ class CampaignCriterion
656
+ attr_accessor :campaignId
657
+ attr_accessor :criterion
658
+ attr_accessor :campaignCriterion_Type
659
+
660
+ def initialize(campaignId = nil, criterion = nil, campaignCriterion_Type = nil)
661
+ @campaignId = campaignId
662
+ @criterion = criterion
663
+ @campaignCriterion_Type = campaignCriterion_Type
664
+ end
665
+ end
666
+
667
+ # NegativeCampaignCriterion
668
+ # - campaignId - SOAP::SOAPLong
669
+ # - criterion - AdwordsApi::V201101::CampaignCriterionService::Criterion
670
+ # - campaignCriterion_Type - SOAP::SOAPString
671
+ class NegativeCampaignCriterion < CampaignCriterion
672
+ attr_accessor :campaignId
673
+ attr_accessor :criterion
674
+ attr_accessor :campaignCriterion_Type
675
+
676
+ def initialize(campaignId = nil, criterion = nil, campaignCriterion_Type = nil)
677
+ @campaignId = campaignId
678
+ @criterion = criterion
679
+ @campaignCriterion_Type = campaignCriterion_Type
680
+ end
681
+ end
682
+
798
683
  # Criterion
799
684
  # - id - SOAP::SOAPLong
800
685
  # - criterion_Type - SOAP::SOAPString
@@ -859,6 +744,25 @@ class Placement < Criterion
859
744
  end
860
745
  end
861
746
 
747
+ # Product
748
+ # - id - SOAP::SOAPLong
749
+ # - criterion_Type - SOAP::SOAPString
750
+ # - conditions - AdwordsApi::V201101::CampaignCriterionService::ProductCondition
751
+ # - text - SOAP::SOAPString
752
+ class Product < Criterion
753
+ attr_accessor :id
754
+ attr_accessor :criterion_Type
755
+ attr_accessor :conditions
756
+ attr_accessor :text
757
+
758
+ def initialize(id = nil, criterion_Type = nil, conditions = [], text = nil)
759
+ @id = id
760
+ @criterion_Type = criterion_Type
761
+ @conditions = conditions
762
+ @text = text
763
+ end
764
+ end
765
+
862
766
  # CriterionUserInterest
863
767
  # - id - SOAP::SOAPLong
864
768
  # - criterion_Type - SOAP::SOAPString
@@ -916,54 +820,16 @@ class Vertical < Criterion
916
820
  end
917
821
  end
918
822
 
919
- # Product
920
- # - id - SOAP::SOAPLong
921
- # - criterion_Type - SOAP::SOAPString
922
- # - conditions - AdwordsApi::V201101::CampaignCriterionService::ProductCondition
923
- # - text - SOAP::SOAPString
924
- class Product < Criterion
925
- attr_accessor :id
926
- attr_accessor :criterion_Type
927
- attr_accessor :conditions
928
- attr_accessor :text
929
-
930
- def initialize(id = nil, criterion_Type = nil, conditions = [], text = nil)
931
- @id = id
932
- @criterion_Type = criterion_Type
933
- @conditions = conditions
934
- @text = text
935
- end
936
- end
937
-
938
- # CampaignCriterion
939
- # - campaignId - SOAP::SOAPLong
940
- # - criterion - AdwordsApi::V201101::CampaignCriterionService::Criterion
941
- # - campaignCriterion_Type - SOAP::SOAPString
942
- class CampaignCriterion
943
- attr_accessor :campaignId
944
- attr_accessor :criterion
945
- attr_accessor :campaignCriterion_Type
946
-
947
- def initialize(campaignId = nil, criterion = nil, campaignCriterion_Type = nil)
948
- @campaignId = campaignId
949
- @criterion = criterion
950
- @campaignCriterion_Type = campaignCriterion_Type
951
- end
952
- end
953
-
954
- # NegativeCampaignCriterion
955
- # - campaignId - SOAP::SOAPLong
956
- # - criterion - AdwordsApi::V201101::CampaignCriterionService::Criterion
957
- # - campaignCriterion_Type - SOAP::SOAPString
958
- class NegativeCampaignCriterion < CampaignCriterion
959
- attr_accessor :campaignId
960
- attr_accessor :criterion
961
- attr_accessor :campaignCriterion_Type
823
+ # DateRange
824
+ # - min - SOAP::SOAPString
825
+ # - max - SOAP::SOAPString
826
+ class DateRange
827
+ attr_accessor :min
828
+ attr_accessor :max
962
829
 
963
- def initialize(campaignId = nil, criterion = nil, campaignCriterion_Type = nil)
964
- @campaignId = campaignId
965
- @criterion = criterion
966
- @campaignCriterion_Type = campaignCriterion_Type
830
+ def initialize(min = nil, max = nil)
831
+ @min = min
832
+ @max = max
967
833
  end
968
834
  end
969
835
 
@@ -1021,6 +887,19 @@ class CampaignCriterionOperation < Operation
1021
887
  end
1022
888
  end
1023
889
 
890
+ # OrderBy
891
+ # - field - SOAP::SOAPString
892
+ # - sortOrder - AdwordsApi::V201101::CampaignCriterionService::SortOrder
893
+ class OrderBy
894
+ attr_accessor :field
895
+ attr_accessor :sortOrder
896
+
897
+ def initialize(field = nil, sortOrder = nil)
898
+ @field = field
899
+ @sortOrder = sortOrder
900
+ end
901
+ end
902
+
1024
903
  # Page
1025
904
  # abstract
1026
905
  # - totalNumEntries - SOAP::SOAPInt
@@ -1051,6 +930,127 @@ class CampaignCriterionPage < Page
1051
930
  end
1052
931
  end
1053
932
 
933
+ # Paging
934
+ # - startIndex - SOAP::SOAPInt
935
+ # - numberResults - SOAP::SOAPInt
936
+ class Paging
937
+ attr_accessor :startIndex
938
+ attr_accessor :numberResults
939
+
940
+ def initialize(startIndex = nil, numberResults = nil)
941
+ @startIndex = startIndex
942
+ @numberResults = numberResults
943
+ end
944
+ end
945
+
946
+ # Predicate
947
+ # - field - SOAP::SOAPString
948
+ # - operator - AdwordsApi::V201101::CampaignCriterionService::PredicateOperator
949
+ # - values - SOAP::SOAPString
950
+ class Predicate
951
+ attr_accessor :field
952
+ attr_accessor :operator
953
+ attr_accessor :values
954
+
955
+ def initialize(field = nil, operator = nil, values = [])
956
+ @field = field
957
+ @operator = operator
958
+ @values = values
959
+ end
960
+ end
961
+
962
+ # ProductCondition
963
+ # - argument - SOAP::SOAPString
964
+ # - operand - AdwordsApi::V201101::CampaignCriterionService::ProductConditionOperand
965
+ class ProductCondition
966
+ attr_accessor :argument
967
+ attr_accessor :operand
968
+
969
+ def initialize(argument = nil, operand = nil)
970
+ @argument = argument
971
+ @operand = operand
972
+ end
973
+ end
974
+
975
+ # ProductConditionOperand
976
+ # - operand - SOAP::SOAPString
977
+ class ProductConditionOperand
978
+ attr_accessor :operand
979
+
980
+ def initialize(operand = nil)
981
+ @operand = operand
982
+ end
983
+ end
984
+
985
+ # Selector
986
+ # - fields - SOAP::SOAPString
987
+ # - predicates - AdwordsApi::V201101::CampaignCriterionService::Predicate
988
+ # - dateRange - AdwordsApi::V201101::CampaignCriterionService::DateRange
989
+ # - ordering - AdwordsApi::V201101::CampaignCriterionService::OrderBy
990
+ # - paging - AdwordsApi::V201101::CampaignCriterionService::Paging
991
+ class Selector
992
+ attr_accessor :fields
993
+ attr_accessor :predicates
994
+ attr_accessor :dateRange
995
+ attr_accessor :ordering
996
+ attr_accessor :paging
997
+
998
+ def initialize(fields = [], predicates = [], dateRange = nil, ordering = [], paging = nil)
999
+ @fields = fields
1000
+ @predicates = predicates
1001
+ @dateRange = dateRange
1002
+ @ordering = ordering
1003
+ @paging = paging
1004
+ end
1005
+ end
1006
+
1007
+ # SoapHeader
1008
+ # - authToken - SOAP::SOAPString
1009
+ # - clientCustomerId - SOAP::SOAPString
1010
+ # - clientEmail - SOAP::SOAPString
1011
+ # - developerToken - SOAP::SOAPString
1012
+ # - userAgent - SOAP::SOAPString
1013
+ # - validateOnly - SOAP::SOAPBoolean
1014
+ # - partialFailure - SOAP::SOAPBoolean
1015
+ class SoapHeader
1016
+ attr_accessor :authToken
1017
+ attr_accessor :clientCustomerId
1018
+ attr_accessor :clientEmail
1019
+ attr_accessor :developerToken
1020
+ attr_accessor :userAgent
1021
+ attr_accessor :validateOnly
1022
+ attr_accessor :partialFailure
1023
+
1024
+ def initialize(authToken = nil, clientCustomerId = nil, clientEmail = nil, developerToken = nil, userAgent = nil, validateOnly = nil, partialFailure = nil)
1025
+ @authToken = authToken
1026
+ @clientCustomerId = clientCustomerId
1027
+ @clientEmail = clientEmail
1028
+ @developerToken = developerToken
1029
+ @userAgent = userAgent
1030
+ @validateOnly = validateOnly
1031
+ @partialFailure = partialFailure
1032
+ end
1033
+ end
1034
+
1035
+ # SoapResponseHeader
1036
+ # - requestId - SOAP::SOAPString
1037
+ # - operations - SOAP::SOAPLong
1038
+ # - responseTime - SOAP::SOAPLong
1039
+ # - units - SOAP::SOAPLong
1040
+ class SoapResponseHeader
1041
+ attr_accessor :requestId
1042
+ attr_accessor :operations
1043
+ attr_accessor :responseTime
1044
+ attr_accessor :units
1045
+
1046
+ def initialize(requestId = nil, operations = nil, responseTime = nil, units = nil)
1047
+ @requestId = requestId
1048
+ @operations = operations
1049
+ @responseTime = responseTime
1050
+ @units = units
1051
+ end
1052
+ end
1053
+
1054
1054
  # AuthenticationError.Reason
1055
1055
  class AuthenticationErrorReason < ::String
1056
1056
  AUTHENTICATION_FAILED = AuthenticationErrorReason.new("AUTHENTICATION_FAILED")