adwords4r 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/Authors.txt +2 -0
  2. data/ChangeLog.txt +4 -0
  3. data/Copying.txt +28 -0
  4. data/Licence.txt +10 -0
  5. data/Rakefile +190 -0
  6. data/Readme.txt +61 -0
  7. data/Todo.txt +9 -0
  8. data/examples/campaign.rb +36 -0
  9. data/examples/framework.rb +6 -0
  10. data/lib/adwords4r.rb +136 -0
  11. data/lib/adwords4r/credentials.rb +37 -0
  12. data/lib/adwords4r/services.rb +41 -0
  13. data/lib/adwords4r/v2/AccountService.rb +626 -0
  14. data/lib/adwords4r/v2/AccountServiceDriver.rb +153 -0
  15. data/lib/adwords4r/v2/AdGroupService.rb +315 -0
  16. data/lib/adwords4r/v2/AdGroupServiceDriver.rb +97 -0
  17. data/lib/adwords4r/v2/CampaignService.rb +515 -0
  18. data/lib/adwords4r/v2/CampaignServiceDriver.rb +111 -0
  19. data/lib/adwords4r/v2/CreativeService.rb +399 -0
  20. data/lib/adwords4r/v2/CreativeServiceDriver.rb +104 -0
  21. data/lib/adwords4r/v2/CriterionService.rb +413 -0
  22. data/lib/adwords4r/v2/CriterionServiceDriver.rb +97 -0
  23. data/lib/adwords4r/v2/InfoService.rb +258 -0
  24. data/lib/adwords4r/v2/InfoServiceDriver.rb +90 -0
  25. data/lib/adwords4r/v2/KeywordService.rb +541 -0
  26. data/lib/adwords4r/v2/KeywordServiceDriver.rb +125 -0
  27. data/lib/adwords4r/v2/ReportService.rb +567 -0
  28. data/lib/adwords4r/v2/ReportServiceDriver.rb +83 -0
  29. data/lib/adwords4r/v2/TrafficEstimatorService.rb +249 -0
  30. data/lib/adwords4r/v2/TrafficEstimatorServiceDriver.rb +62 -0
  31. data/lib/adwords4r/v2/default.rb +364 -0
  32. data/lib/adwords4r/v2/defaultDriver.rb +102 -0
  33. data/lib/adwords4r/v3/AccountService.rb +626 -0
  34. data/lib/adwords4r/v3/AccountServiceDriver.rb +153 -0
  35. data/lib/adwords4r/v3/AdGroupService.rb +318 -0
  36. data/lib/adwords4r/v3/AdGroupServiceDriver.rb +97 -0
  37. data/lib/adwords4r/v3/CampaignService.rb +529 -0
  38. data/lib/adwords4r/v3/CampaignServiceDriver.rb +111 -0
  39. data/lib/adwords4r/v3/CreativeService.rb +399 -0
  40. data/lib/adwords4r/v3/CreativeServiceDriver.rb +104 -0
  41. data/lib/adwords4r/v3/CriterionService.rb +413 -0
  42. data/lib/adwords4r/v3/CriterionServiceDriver.rb +97 -0
  43. data/lib/adwords4r/v3/InfoService.rb +258 -0
  44. data/lib/adwords4r/v3/InfoServiceDriver.rb +90 -0
  45. data/lib/adwords4r/v3/KeywordService.rb +541 -0
  46. data/lib/adwords4r/v3/KeywordServiceDriver.rb +125 -0
  47. data/lib/adwords4r/v3/KeywordToolService.rb +225 -0
  48. data/lib/adwords4r/v3/KeywordToolServiceDriver.rb +55 -0
  49. data/lib/adwords4r/v3/ReportService.rb +567 -0
  50. data/lib/adwords4r/v3/ReportServiceDriver.rb +83 -0
  51. data/lib/adwords4r/v3/TrafficEstimatorService.rb +263 -0
  52. data/lib/adwords4r/v3/TrafficEstimatorServiceDriver.rb +62 -0
  53. data/scripts/publish.rb +16 -0
  54. data/setup.rb +1585 -0
  55. metadata +92 -0
@@ -0,0 +1,97 @@
1
+ require 'adwords4r/v2/AdGroupService'
2
+
3
+ require 'soap/rpc/driver'
4
+ module AdWordsV2
5
+
6
+ class AdGroupService < ::SOAP::RPC::Driver
7
+ DefaultEndpointUrl = "https://adwords.google.com:443/api/adwords/v2/AdGroupService"
8
+ MappingRegistry = ::SOAP::Mapping::Registry.new
9
+
10
+ Methods = [
11
+ [ "",
12
+ "getAdGroupList",
13
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAdGroupList"], true],
14
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAdGroupListResponse"], true] ],
15
+ { :request_style => :document, :request_use => :literal,
16
+ :response_style => :document, :response_use => :literal }
17
+ ],
18
+ [ "",
19
+ "getAllAdGroups",
20
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAllAdGroups"], true],
21
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAllAdGroupsResponse"], true] ],
22
+ { :request_style => :document, :request_use => :literal,
23
+ :response_style => :document, :response_use => :literal }
24
+ ],
25
+ [ "",
26
+ "getAdGroup",
27
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAdGroup"], true],
28
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAdGroupResponse"], true] ],
29
+ { :request_style => :document, :request_use => :literal,
30
+ :response_style => :document, :response_use => :literal }
31
+ ],
32
+ [ "",
33
+ "addAdGroup",
34
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "addAdGroup"], true],
35
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "addAdGroupResponse"], true] ],
36
+ { :request_style => :document, :request_use => :literal,
37
+ :response_style => :document, :response_use => :literal }
38
+ ],
39
+ [ "",
40
+ "addAdGroupList",
41
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "addAdGroupList"], true],
42
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "addAdGroupListResponse"], true] ],
43
+ { :request_style => :document, :request_use => :literal,
44
+ :response_style => :document, :response_use => :literal }
45
+ ],
46
+ [ "",
47
+ "updateAdGroup",
48
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "updateAdGroup"], true],
49
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "updateAdGroupResponse"], true] ],
50
+ { :request_style => :document, :request_use => :literal,
51
+ :response_style => :document, :response_use => :literal }
52
+ ],
53
+ [ "",
54
+ "updateAdGroupList",
55
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "updateAdGroupList"], true],
56
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "updateAdGroupListResponse"], true] ],
57
+ { :request_style => :document, :request_use => :literal,
58
+ :response_style => :document, :response_use => :literal }
59
+ ],
60
+ [ "",
61
+ "getAdGroupStats",
62
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAdGroupStats"], true],
63
+ ["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v2", "getAdGroupStatsResponse"], true] ],
64
+ { :request_style => :document, :request_use => :literal,
65
+ :response_style => :document, :response_use => :literal }
66
+ ]
67
+ ]
68
+
69
+ def initialize(endpoint_url = nil)
70
+ endpoint_url ||= DefaultEndpointUrl
71
+ super(endpoint_url, nil)
72
+ self.mapping_registry = MappingRegistry
73
+ init_methods
74
+ end
75
+
76
+ private
77
+
78
+ def init_methods
79
+ Methods.each do |definitions|
80
+ opt = definitions.last
81
+ if opt[:request_style] == :document
82
+ add_document_operation(*definitions)
83
+ else
84
+ add_rpc_operation(*definitions)
85
+ qname = definitions[0]
86
+ name = definitions[2]
87
+ if qname.name != name and qname.name.capitalize == name.capitalize
88
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
89
+ __send__(name, *arg)
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
96
+
97
+ end
@@ -0,0 +1,515 @@
1
+ require 'xsd/qname'
2
+
3
+ # {https://adwords.google.com/api/adwords/v2}getCampaign
4
+ class GetCampaign
5
+ @@schema_type = "getCampaign"
6
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
7
+ @@schema_qualified = "true"
8
+ @@schema_element = [
9
+ ["id", "SOAP::SOAPInt"]
10
+ ]
11
+
12
+ attr_accessor :id
13
+
14
+ def initialize(id = nil)
15
+ @id = id
16
+ end
17
+ end
18
+
19
+ # {https://adwords.google.com/api/adwords/v2}getCampaignResponse
20
+ class GetCampaignResponse
21
+ @@schema_type = "getCampaignResponse"
22
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
23
+ @@schema_qualified = "true"
24
+ @@schema_element = [
25
+ ["getCampaignReturn", "Campaign"]
26
+ ]
27
+
28
+ attr_accessor :getCampaignReturn
29
+
30
+ def initialize(getCampaignReturn = nil)
31
+ @getCampaignReturn = getCampaignReturn
32
+ end
33
+ end
34
+
35
+ # {https://adwords.google.com/api/adwords/v2}getCampaignList
36
+ class GetCampaignList < ::Array
37
+ @@schema_element = [
38
+ ["ids", ["SOAP::SOAPInt[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "ids")]]
39
+ ]
40
+ end
41
+
42
+ # {https://adwords.google.com/api/adwords/v2}getCampaignListResponse
43
+ class GetCampaignListResponse < ::Array
44
+ @@schema_element = [
45
+ ["getCampaignListReturn", ["Campaign[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "getCampaignListReturn")]]
46
+ ]
47
+ end
48
+
49
+ # {https://adwords.google.com/api/adwords/v2}getAllAdWordsCampaigns
50
+ class GetAllAdWordsCampaigns
51
+ @@schema_type = "getAllAdWordsCampaigns"
52
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
53
+ @@schema_qualified = "true"
54
+ @@schema_element = [
55
+ ["dummy", "SOAP::SOAPInt"]
56
+ ]
57
+
58
+ attr_accessor :dummy
59
+
60
+ def initialize(dummy = nil)
61
+ @dummy = dummy
62
+ end
63
+ end
64
+
65
+ # {https://adwords.google.com/api/adwords/v2}getAllAdWordsCampaignsResponse
66
+ class GetAllAdWordsCampaignsResponse < ::Array
67
+ @@schema_element = [
68
+ ["getAllAdWordsCampaignsReturn", ["Campaign[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "getAllAdWordsCampaignsReturn")]]
69
+ ]
70
+ end
71
+
72
+ # {https://adwords.google.com/api/adwords/v2}addCampaign
73
+ class AddCampaign
74
+ @@schema_type = "addCampaign"
75
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
76
+ @@schema_qualified = "true"
77
+ @@schema_element = [
78
+ ["campaign", "Campaign"]
79
+ ]
80
+
81
+ attr_accessor :campaign
82
+
83
+ def initialize(campaign = nil)
84
+ @campaign = campaign
85
+ end
86
+ end
87
+
88
+ # {https://adwords.google.com/api/adwords/v2}addCampaignResponse
89
+ class AddCampaignResponse
90
+ @@schema_type = "addCampaignResponse"
91
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
92
+ @@schema_qualified = "true"
93
+ @@schema_element = [
94
+ ["addCampaignReturn", "Campaign"]
95
+ ]
96
+
97
+ attr_accessor :addCampaignReturn
98
+
99
+ def initialize(addCampaignReturn = nil)
100
+ @addCampaignReturn = addCampaignReturn
101
+ end
102
+ end
103
+
104
+ # {https://adwords.google.com/api/adwords/v2}addCampaignList
105
+ class AddCampaignList < ::Array
106
+ @@schema_element = [
107
+ ["campaigns", ["Campaign[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "campaigns")]]
108
+ ]
109
+ end
110
+
111
+ # {https://adwords.google.com/api/adwords/v2}addCampaignListResponse
112
+ class AddCampaignListResponse < ::Array
113
+ @@schema_element = [
114
+ ["addCampaignListReturn", ["Campaign[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "addCampaignListReturn")]]
115
+ ]
116
+ end
117
+
118
+ # {https://adwords.google.com/api/adwords/v2}updateCampaign
119
+ class UpdateCampaign
120
+ @@schema_type = "updateCampaign"
121
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
122
+ @@schema_qualified = "true"
123
+ @@schema_element = [
124
+ ["campaign", "Campaign"]
125
+ ]
126
+
127
+ attr_accessor :campaign
128
+
129
+ def initialize(campaign = nil)
130
+ @campaign = campaign
131
+ end
132
+ end
133
+
134
+ # {https://adwords.google.com/api/adwords/v2}updateCampaignResponse
135
+ class UpdateCampaignResponse
136
+ @@schema_type = "updateCampaignResponse"
137
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
138
+ @@schema_qualified = "true"
139
+ @@schema_element = []
140
+
141
+ def initialize
142
+ end
143
+ end
144
+
145
+ # {https://adwords.google.com/api/adwords/v2}updateCampaignList
146
+ class UpdateCampaignList < ::Array
147
+ @@schema_element = [
148
+ ["campaigns", ["Campaign[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "campaigns")]]
149
+ ]
150
+ end
151
+
152
+ # {https://adwords.google.com/api/adwords/v2}updateCampaignListResponse
153
+ class UpdateCampaignListResponse
154
+ @@schema_type = "updateCampaignListResponse"
155
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
156
+ @@schema_qualified = "true"
157
+ @@schema_element = []
158
+
159
+ def initialize
160
+ end
161
+ end
162
+
163
+ # {https://adwords.google.com/api/adwords/v2}getOptimizeAdServing
164
+ class GetOptimizeAdServing
165
+ @@schema_type = "getOptimizeAdServing"
166
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
167
+ @@schema_qualified = "true"
168
+ @@schema_element = [
169
+ ["campaignId", "SOAP::SOAPInt"]
170
+ ]
171
+
172
+ attr_accessor :campaignId
173
+
174
+ def initialize(campaignId = nil)
175
+ @campaignId = campaignId
176
+ end
177
+ end
178
+
179
+ # {https://adwords.google.com/api/adwords/v2}getOptimizeAdServingResponse
180
+ class GetOptimizeAdServingResponse
181
+ @@schema_type = "getOptimizeAdServingResponse"
182
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
183
+ @@schema_qualified = "true"
184
+ @@schema_element = [
185
+ ["getOptimizeAdServingReturn", "SOAP::SOAPBoolean"]
186
+ ]
187
+
188
+ attr_accessor :getOptimizeAdServingReturn
189
+
190
+ def initialize(getOptimizeAdServingReturn = nil)
191
+ @getOptimizeAdServingReturn = getOptimizeAdServingReturn
192
+ end
193
+ end
194
+
195
+ # {https://adwords.google.com/api/adwords/v2}setOptimizeAdServing
196
+ class SetOptimizeAdServing
197
+ @@schema_type = "setOptimizeAdServing"
198
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
199
+ @@schema_qualified = "true"
200
+ @@schema_element = [
201
+ ["campaignId", "SOAP::SOAPInt"],
202
+ ["enable", "SOAP::SOAPBoolean"]
203
+ ]
204
+
205
+ attr_accessor :campaignId
206
+ attr_accessor :enable
207
+
208
+ def initialize(campaignId = nil, enable = nil)
209
+ @campaignId = campaignId
210
+ @enable = enable
211
+ end
212
+ end
213
+
214
+ # {https://adwords.google.com/api/adwords/v2}setOptimizeAdServingResponse
215
+ class SetOptimizeAdServingResponse
216
+ @@schema_type = "setOptimizeAdServingResponse"
217
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
218
+ @@schema_qualified = "true"
219
+ @@schema_element = []
220
+
221
+ def initialize
222
+ end
223
+ end
224
+
225
+ # {https://adwords.google.com/api/adwords/v2}getCampaignStats
226
+ class GetCampaignStats
227
+ @@schema_type = "getCampaignStats"
228
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
229
+ @@schema_qualified = "true"
230
+ @@schema_element = [
231
+ ["campaignIds", "SOAP::SOAPInt[]"],
232
+ ["start", "SOAP::SOAPDateTime"],
233
+ ["v_end", ["SOAP::SOAPDateTime", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "end")]]
234
+ ]
235
+
236
+ attr_accessor :campaignIds
237
+ attr_accessor :start
238
+
239
+ def end
240
+ @v_end
241
+ end
242
+
243
+ def end=(value)
244
+ @v_end = value
245
+ end
246
+
247
+ def initialize(campaignIds = [], start = nil, v_end = nil)
248
+ @campaignIds = campaignIds
249
+ @start = start
250
+ @v_end = v_end
251
+ end
252
+ end
253
+
254
+ # {https://adwords.google.com/api/adwords/v2}getCampaignStatsResponse
255
+ class GetCampaignStatsResponse < ::Array
256
+ @@schema_element = [
257
+ ["getCampaignStatsReturn", ["StatsRecord[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "getCampaignStatsReturn")]]
258
+ ]
259
+ end
260
+
261
+ # {https://adwords.google.com/api/adwords/v2}Criterion
262
+ class Criterion
263
+ @@schema_type = "Criterion"
264
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
265
+ @@schema_element = [
266
+ ["id", "SOAP::SOAPLong"],
267
+ ["adGroupId", "SOAP::SOAPInt"],
268
+ ["exemptionRequest", "SOAP::SOAPString"],
269
+ ["criterionType", "SOAP::SOAPString"],
270
+ ["language", "SOAP::SOAPString"],
271
+ ["status", "CriterionStatus"],
272
+ ["negative", "SOAP::SOAPBoolean"],
273
+ ["destinationUrl", "SOAP::SOAPString"]
274
+ ]
275
+
276
+ attr_accessor :id
277
+ attr_accessor :adGroupId
278
+ attr_accessor :exemptionRequest
279
+ attr_accessor :criterionType
280
+ attr_accessor :language
281
+ attr_accessor :status
282
+ attr_accessor :negative
283
+ attr_accessor :destinationUrl
284
+
285
+ def initialize(id = nil, adGroupId = nil, exemptionRequest = nil, criterionType = nil, language = nil, status = nil, negative = nil, destinationUrl = nil)
286
+ @id = id
287
+ @adGroupId = adGroupId
288
+ @exemptionRequest = exemptionRequest
289
+ @criterionType = criterionType
290
+ @language = language
291
+ @status = status
292
+ @negative = negative
293
+ @destinationUrl = destinationUrl
294
+ end
295
+ end
296
+
297
+ # {https://adwords.google.com/api/adwords/v2}Keyword
298
+ class Keyword
299
+ @@schema_type = "Keyword"
300
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
301
+ @@schema_element = [
302
+ ["id", "SOAP::SOAPLong"],
303
+ ["adGroupId", "SOAP::SOAPInt"],
304
+ ["exemptionRequest", "SOAP::SOAPString"],
305
+ ["criterionType", "SOAP::SOAPString"],
306
+ ["language", "SOAP::SOAPString"],
307
+ ["status", "CriterionStatus"],
308
+ ["negative", "SOAP::SOAPBoolean"],
309
+ ["destinationUrl", "SOAP::SOAPString"],
310
+ ["type", "KeywordType"],
311
+ ["minCpc", "SOAP::SOAPLong"],
312
+ ["maxCpc", "SOAP::SOAPLong"],
313
+ ["text", "SOAP::SOAPString"]
314
+ ]
315
+
316
+ attr_accessor :id
317
+ attr_accessor :adGroupId
318
+ attr_accessor :exemptionRequest
319
+ attr_accessor :criterionType
320
+ attr_accessor :language
321
+ attr_accessor :status
322
+ attr_accessor :negative
323
+ attr_accessor :destinationUrl
324
+ attr_accessor :type
325
+ attr_accessor :minCpc
326
+ attr_accessor :maxCpc
327
+ attr_accessor :text
328
+
329
+ def initialize(id = nil, adGroupId = nil, exemptionRequest = nil, criterionType = nil, language = nil, status = nil, negative = nil, destinationUrl = nil, type = nil, minCpc = nil, maxCpc = nil, text = nil)
330
+ @id = id
331
+ @adGroupId = adGroupId
332
+ @exemptionRequest = exemptionRequest
333
+ @criterionType = criterionType
334
+ @language = language
335
+ @status = status
336
+ @negative = negative
337
+ @destinationUrl = destinationUrl
338
+ @type = type
339
+ @minCpc = minCpc
340
+ @maxCpc = maxCpc
341
+ @text = text
342
+ end
343
+ end
344
+
345
+ # {https://adwords.google.com/api/adwords/v2}LanguageTarget
346
+ class LanguageTarget < ::Array
347
+ @@schema_element = [
348
+ ["languages", ["SOAP::SOAPString[]", XSD::QName.new("https://adwords.google.com/api/adwords/v2", "languages")]]
349
+ ]
350
+ end
351
+
352
+ # {https://adwords.google.com/api/adwords/v2}GeoTarget
353
+ class GeoTarget
354
+ @@schema_type = "GeoTarget"
355
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
356
+ @@schema_element = [
357
+ ["countries", "SOAP::SOAPString[]"],
358
+ ["regions", "SOAP::SOAPString[]"],
359
+ ["metros", "SOAP::SOAPString[]"],
360
+ ["cities", "SOAP::SOAPString[]"]
361
+ ]
362
+
363
+ attr_accessor :countries
364
+ attr_accessor :regions
365
+ attr_accessor :metros
366
+ attr_accessor :cities
367
+
368
+ def initialize(countries = [], regions = [], metros = [], cities = [])
369
+ @countries = countries
370
+ @regions = regions
371
+ @metros = metros
372
+ @cities = cities
373
+ end
374
+ end
375
+
376
+ # {https://adwords.google.com/api/adwords/v2}Campaign
377
+ class Campaign
378
+ @@schema_type = "Campaign"
379
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
380
+ @@schema_element = [
381
+ ["id", "SOAP::SOAPInt"],
382
+ ["name", "SOAP::SOAPString"],
383
+ ["status", "CampaignStatus"],
384
+ ["startDate", "SOAP::SOAPDateTime"],
385
+ ["endDate", "SOAP::SOAPDateTime"],
386
+ ["dailyBudget", "SOAP::SOAPLong"],
387
+ ["optInSearchNetwork", "SOAP::SOAPBoolean"],
388
+ ["optInContentNetwork", "SOAP::SOAPBoolean"],
389
+ ["campaignNegativeKeywords", "Keyword[]"],
390
+ ["languageTargeting", "LanguageTarget"],
391
+ ["geoTargeting", "GeoTarget"]
392
+ ]
393
+
394
+ attr_accessor :id
395
+ attr_accessor :name
396
+ attr_accessor :status
397
+ attr_accessor :startDate
398
+ attr_accessor :endDate
399
+ attr_accessor :dailyBudget
400
+ attr_accessor :optInSearchNetwork
401
+ attr_accessor :optInContentNetwork
402
+ attr_accessor :campaignNegativeKeywords
403
+ attr_accessor :languageTargeting
404
+ attr_accessor :geoTargeting
405
+
406
+ def initialize(id = nil, name = nil, status = nil, startDate = nil, endDate = nil, dailyBudget = nil, optInSearchNetwork = nil, optInContentNetwork = nil, campaignNegativeKeywords = [], languageTargeting = nil, geoTargeting = nil)
407
+ @id = id
408
+ @name = name
409
+ @status = status
410
+ @startDate = startDate
411
+ @endDate = endDate
412
+ @dailyBudget = dailyBudget
413
+ @optInSearchNetwork = optInSearchNetwork
414
+ @optInContentNetwork = optInContentNetwork
415
+ @campaignNegativeKeywords = campaignNegativeKeywords
416
+ @languageTargeting = languageTargeting
417
+ @geoTargeting = geoTargeting
418
+ end
419
+ end
420
+
421
+ # {https://adwords.google.com/api/adwords/v2}ApiException
422
+ class ApiException
423
+ @@schema_type = "ApiException"
424
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
425
+ @@schema_element = [
426
+ ["code", "SOAP::SOAPInt"],
427
+ ["internal", "SOAP::SOAPBoolean"],
428
+ ["message", "SOAP::SOAPString"],
429
+ ["trigger", "SOAP::SOAPString"],
430
+ ["violations", "SOAP::SOAPString"]
431
+ ]
432
+
433
+ attr_accessor :code
434
+ attr_accessor :internal
435
+ attr_accessor :message
436
+ attr_accessor :trigger
437
+ attr_accessor :violations
438
+
439
+ def initialize(code = nil, internal = nil, message = nil, trigger = nil, violations = nil)
440
+ @code = code
441
+ @internal = internal
442
+ @message = message
443
+ @trigger = trigger
444
+ @violations = violations
445
+ end
446
+ end
447
+
448
+ # {https://adwords.google.com/api/adwords/v2}StatsRecord
449
+ class StatsRecord
450
+ @@schema_type = "StatsRecord"
451
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
452
+ @@schema_element = [
453
+ ["averagePosition", "SOAP::SOAPDouble"],
454
+ ["clicks", "SOAP::SOAPLong"],
455
+ ["conversionRate", "SOAP::SOAPDouble"],
456
+ ["conversions", "SOAP::SOAPLong"],
457
+ ["cost", "SOAP::SOAPLong"],
458
+ ["id", "SOAP::SOAPLong"],
459
+ ["impressions", "SOAP::SOAPLong"]
460
+ ]
461
+
462
+ attr_accessor :averagePosition
463
+ attr_accessor :clicks
464
+ attr_accessor :conversionRate
465
+ attr_accessor :conversions
466
+ attr_accessor :cost
467
+ attr_accessor :id
468
+ attr_accessor :impressions
469
+
470
+ def initialize(averagePosition = nil, clicks = nil, conversionRate = nil, conversions = nil, cost = nil, id = nil, impressions = nil)
471
+ @averagePosition = averagePosition
472
+ @clicks = clicks
473
+ @conversionRate = conversionRate
474
+ @conversions = conversions
475
+ @cost = cost
476
+ @id = id
477
+ @impressions = impressions
478
+ end
479
+ end
480
+
481
+ # {https://adwords.google.com/api/adwords/v2}CriterionStatus
482
+ class CriterionStatus < ::String
483
+ @@schema_type = "CriterionStatus"
484
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
485
+
486
+ Deleted = CriterionStatus.new("Deleted")
487
+ Disabled = CriterionStatus.new("Disabled")
488
+ Disapproved = CriterionStatus.new("Disapproved")
489
+ InTrial = CriterionStatus.new("InTrial")
490
+ Normal = CriterionStatus.new("Normal")
491
+ OnHold = CriterionStatus.new("OnHold")
492
+ end
493
+
494
+ # {https://adwords.google.com/api/adwords/v2}KeywordType
495
+ class KeywordType < ::String
496
+ @@schema_type = "KeywordType"
497
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
498
+
499
+ Broad = KeywordType.new("Broad")
500
+ Exact = KeywordType.new("Exact")
501
+ Phrase = KeywordType.new("Phrase")
502
+ end
503
+
504
+ # {https://adwords.google.com/api/adwords/v2}CampaignStatus
505
+ class CampaignStatus < ::String
506
+ @@schema_type = "CampaignStatus"
507
+ @@schema_ns = "https://adwords.google.com/api/adwords/v2"
508
+
509
+ Active = CampaignStatus.new("Active")
510
+ Deleted = CampaignStatus.new("Deleted")
511
+ Ended = CampaignStatus.new("Ended")
512
+ Paused = CampaignStatus.new("Paused")
513
+ Pending = CampaignStatus.new("Pending")
514
+ Suspended = CampaignStatus.new("Suspended")
515
+ end