adwords4r 12.1.0 → 13.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.txt +3 -0
- data/Rakefile +1 -1
- data/examples/account_info.rb +2 -2
- data/examples/create_all.rb +2 -2
- data/examples/keyword_suggestions.rb +14 -8
- data/examples/reports.rb +2 -2
- data/lib/adwords4r/services.rb +2 -0
- data/lib/adwords4r/v12/AccountServiceDriver.rb +3 -3
- data/lib/adwords4r/v12/AdGroupServiceDriver.rb +8 -8
- data/lib/adwords4r/v12/AdServiceDriver.rb +10 -10
- data/lib/adwords4r/v12/CampaignServiceDriver.rb +11 -11
- data/lib/adwords4r/v12/CriterionServiceDriver.rb +9 -9
- data/lib/adwords4r/v12/InfoServiceDriver.rb +8 -8
- data/lib/adwords4r/v12/KeywordToolServiceDriver.rb +2 -2
- data/lib/adwords4r/v12/ReportServiceDriver.rb +7 -7
- data/lib/adwords4r/v12/ReportServiceMappingRegistry.rb +2 -2
- data/lib/adwords4r/v12/SiteSuggestionServiceDriver.rb +4 -4
- data/lib/adwords4r/v12/TrafficEstimatorService.rb +1 -1
- data/lib/adwords4r/v12/TrafficEstimatorServiceDriver.rb +4 -4
- data/lib/adwords4r/v12/TrafficEstimatorServiceMappingRegistry.rb +2 -2
- data/lib/adwords4r/v13/AccountService.rb +297 -0
- data/lib/adwords4r/v13/AccountServiceDriver.rb +85 -0
- data/lib/adwords4r/v13/AccountServiceMappingRegistry.rb +337 -0
- data/lib/adwords4r/v13/AdGroupService.rb +277 -0
- data/lib/adwords4r/v13/AdGroupServiceDriver.rb +117 -0
- data/lib/adwords4r/v13/AdGroupServiceMappingRegistry.rb +296 -0
- data/lib/adwords4r/v13/AdService.rb +846 -0
- data/lib/adwords4r/v13/AdServiceDriver.rb +125 -0
- data/lib/adwords4r/v13/AdServiceMappingRegistry.rb +859 -0
- data/lib/adwords4r/v13/CampaignService.rb +562 -0
- data/lib/adwords4r/v13/CampaignServiceDriver.rb +149 -0
- data/lib/adwords4r/v13/CampaignServiceMappingRegistry.rb +696 -0
- data/lib/adwords4r/v13/CriterionService.rb +484 -0
- data/lib/adwords4r/v13/CriterionServiceDriver.rb +117 -0
- data/lib/adwords4r/v13/CriterionServiceMappingRegistry.rb +519 -0
- data/lib/adwords4r/v13/InfoService.rb +242 -0
- data/lib/adwords4r/v13/InfoServiceDriver.rb +109 -0
- data/lib/adwords4r/v13/InfoServiceMappingRegistry.rb +228 -0
- data/lib/adwords4r/v13/KeywordToolService.rb +211 -0
- data/lib/adwords4r/v13/KeywordToolServiceDriver.rb +61 -0
- data/lib/adwords4r/v13/KeywordToolServiceMappingRegistry.rb +231 -0
- data/lib/adwords4r/v13/ReportService.rb +322 -0
- data/lib/adwords4r/v13/ReportServiceDriver.rb +101 -0
- data/lib/adwords4r/v13/ReportServiceMappingRegistry.rb +298 -0
- data/lib/adwords4r/v13/SiteSuggestionService.rb +242 -0
- data/lib/adwords4r/v13/SiteSuggestionServiceDriver.rb +77 -0
- data/lib/adwords4r/v13/SiteSuggestionServiceMappingRegistry.rb +271 -0
- data/lib/adwords4r/v13/TrafficEstimatorService.rb +348 -0
- data/lib/adwords4r/v13/TrafficEstimatorServiceDriver.rb +77 -0
- data/lib/adwords4r/v13/TrafficEstimatorServiceMappingRegistry.rb +491 -0
- data/setup.rb +0 -0
- metadata +93 -54
@@ -0,0 +1,322 @@
|
|
1
|
+
require 'xsd/qname'
|
2
|
+
|
3
|
+
module AdWords; module ReportService
|
4
|
+
|
5
|
+
|
6
|
+
# {https://adwords.google.com/api/adwords/v13}ApiError
|
7
|
+
# code - SOAP::SOAPInt
|
8
|
+
# detail - SOAP::SOAPString
|
9
|
+
# field - SOAP::SOAPString
|
10
|
+
# index - SOAP::SOAPInt
|
11
|
+
# isExemptable - SOAP::SOAPBoolean
|
12
|
+
# textIndex - SOAP::SOAPInt
|
13
|
+
# textLength - SOAP::SOAPInt
|
14
|
+
# trigger - SOAP::SOAPString
|
15
|
+
class ApiError
|
16
|
+
attr_accessor :code
|
17
|
+
attr_accessor :detail
|
18
|
+
attr_accessor :field
|
19
|
+
attr_accessor :index
|
20
|
+
attr_accessor :isExemptable
|
21
|
+
attr_accessor :textIndex
|
22
|
+
attr_accessor :textLength
|
23
|
+
attr_accessor :trigger
|
24
|
+
|
25
|
+
def initialize(code = nil, detail = nil, field = nil, index = nil, isExemptable = nil, textIndex = nil, textLength = nil, trigger = nil)
|
26
|
+
@code = code
|
27
|
+
@detail = detail
|
28
|
+
@field = field
|
29
|
+
@index = index
|
30
|
+
@isExemptable = isExemptable
|
31
|
+
@textIndex = textIndex
|
32
|
+
@textLength = textLength
|
33
|
+
@trigger = trigger
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# {https://adwords.google.com/api/adwords/v13}ApiException
|
38
|
+
# code - SOAP::SOAPInt
|
39
|
+
# errors - AdWords::ReportService::ApiError
|
40
|
+
# internal - SOAP::SOAPBoolean
|
41
|
+
# message - SOAP::SOAPString
|
42
|
+
# trigger - SOAP::SOAPString
|
43
|
+
class ApiException
|
44
|
+
attr_accessor :code
|
45
|
+
attr_accessor :errors
|
46
|
+
attr_accessor :internal
|
47
|
+
attr_accessor :message
|
48
|
+
attr_accessor :trigger
|
49
|
+
|
50
|
+
def initialize(code = nil, errors = [], internal = nil, message = nil, trigger = nil)
|
51
|
+
@code = code
|
52
|
+
@errors = errors
|
53
|
+
@internal = internal
|
54
|
+
@message = message
|
55
|
+
@trigger = trigger
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# {https://adwords.google.com/api/adwords/v13}ReportJob
|
60
|
+
# abstract
|
61
|
+
# clientEmails - SOAP::SOAPString
|
62
|
+
# crossClient - SOAP::SOAPBoolean
|
63
|
+
# endDay - SOAP::SOAPDate
|
64
|
+
# id - SOAP::SOAPLong
|
65
|
+
# name - SOAP::SOAPString
|
66
|
+
# startDay - SOAP::SOAPDate
|
67
|
+
# status - AdWords::ReportService::ReportJobStatus
|
68
|
+
class ReportJob
|
69
|
+
attr_accessor :clientEmails
|
70
|
+
attr_accessor :crossClient
|
71
|
+
attr_accessor :endDay
|
72
|
+
attr_accessor :id
|
73
|
+
attr_accessor :name
|
74
|
+
attr_accessor :startDay
|
75
|
+
attr_accessor :status
|
76
|
+
|
77
|
+
def initialize(clientEmails = [], crossClient = nil, endDay = nil, id = nil, name = nil, startDay = nil, status = nil)
|
78
|
+
@clientEmails = clientEmails
|
79
|
+
@crossClient = crossClient
|
80
|
+
@endDay = endDay
|
81
|
+
@id = id
|
82
|
+
@name = name
|
83
|
+
@startDay = startDay
|
84
|
+
@status = status
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# {https://adwords.google.com/api/adwords/v13}DefinedReportJob
|
89
|
+
# clientEmails - SOAP::SOAPString
|
90
|
+
# crossClient - SOAP::SOAPBoolean
|
91
|
+
# endDay - SOAP::SOAPDate
|
92
|
+
# id - SOAP::SOAPLong
|
93
|
+
# name - SOAP::SOAPString
|
94
|
+
# startDay - SOAP::SOAPDate
|
95
|
+
# status - AdWords::ReportService::ReportJobStatus
|
96
|
+
# adGroupStatuses - AdWords::ReportService::AdGroupStatus
|
97
|
+
# adGroups - SOAP::SOAPLong
|
98
|
+
# adWordsType - AdWords::ReportService::AdWordsType
|
99
|
+
# aggregationTypes - SOAP::SOAPString
|
100
|
+
# campaignStatuses - AdWords::ReportService::CampaignStatus
|
101
|
+
# campaigns - SOAP::SOAPInt
|
102
|
+
# includeZeroImpression - SOAP::SOAPBoolean
|
103
|
+
# keywordStatuses - AdWords::ReportService::KeywordStatus
|
104
|
+
# keywordType - AdWords::ReportService::KeywordType
|
105
|
+
# keywords - SOAP::SOAPString
|
106
|
+
# selectedColumns - SOAP::SOAPString
|
107
|
+
# selectedReportType - SOAP::SOAPString
|
108
|
+
class DefinedReportJob < ReportJob
|
109
|
+
attr_accessor :clientEmails
|
110
|
+
attr_accessor :crossClient
|
111
|
+
attr_accessor :endDay
|
112
|
+
attr_accessor :id
|
113
|
+
attr_accessor :name
|
114
|
+
attr_accessor :startDay
|
115
|
+
attr_accessor :status
|
116
|
+
attr_accessor :adGroupStatuses
|
117
|
+
attr_accessor :adGroups
|
118
|
+
attr_accessor :adWordsType
|
119
|
+
attr_accessor :aggregationTypes
|
120
|
+
attr_accessor :campaignStatuses
|
121
|
+
attr_accessor :campaigns
|
122
|
+
attr_accessor :includeZeroImpression
|
123
|
+
attr_accessor :keywordStatuses
|
124
|
+
attr_accessor :keywordType
|
125
|
+
attr_accessor :keywords
|
126
|
+
attr_accessor :selectedColumns
|
127
|
+
attr_accessor :selectedReportType
|
128
|
+
|
129
|
+
def initialize(clientEmails = [], crossClient = nil, endDay = nil, id = nil, name = nil, startDay = nil, status = nil, adGroupStatuses = [], adGroups = [], adWordsType = nil, aggregationTypes = [], campaignStatuses = [], campaigns = [], includeZeroImpression = nil, keywordStatuses = [], keywordType = nil, keywords = [], selectedColumns = [], selectedReportType = nil)
|
130
|
+
@clientEmails = clientEmails
|
131
|
+
@crossClient = crossClient
|
132
|
+
@endDay = endDay
|
133
|
+
@id = id
|
134
|
+
@name = name
|
135
|
+
@startDay = startDay
|
136
|
+
@status = status
|
137
|
+
@adGroupStatuses = adGroupStatuses
|
138
|
+
@adGroups = adGroups
|
139
|
+
@adWordsType = adWordsType
|
140
|
+
@aggregationTypes = aggregationTypes
|
141
|
+
@campaignStatuses = campaignStatuses
|
142
|
+
@campaigns = campaigns
|
143
|
+
@includeZeroImpression = includeZeroImpression
|
144
|
+
@keywordStatuses = keywordStatuses
|
145
|
+
@keywordType = keywordType
|
146
|
+
@keywords = keywords
|
147
|
+
@selectedColumns = selectedColumns
|
148
|
+
@selectedReportType = selectedReportType
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# {https://adwords.google.com/api/adwords/v13}AdGroupStatus
|
153
|
+
class AdGroupStatus < ::String
|
154
|
+
Deleted = AdGroupStatus.new("Deleted")
|
155
|
+
Enabled = AdGroupStatus.new("Enabled")
|
156
|
+
Paused = AdGroupStatus.new("Paused")
|
157
|
+
end
|
158
|
+
|
159
|
+
# {https://adwords.google.com/api/adwords/v13}AdWordsType
|
160
|
+
class AdWordsType < ::String
|
161
|
+
ContentOnly = AdWordsType.new("ContentOnly")
|
162
|
+
SearchOnly = AdWordsType.new("SearchOnly")
|
163
|
+
end
|
164
|
+
|
165
|
+
# {https://adwords.google.com/api/adwords/v13}CampaignStatus
|
166
|
+
class CampaignStatus < ::String
|
167
|
+
Active = CampaignStatus.new("Active")
|
168
|
+
Deleted = CampaignStatus.new("Deleted")
|
169
|
+
Ended = CampaignStatus.new("Ended")
|
170
|
+
Paused = CampaignStatus.new("Paused")
|
171
|
+
Pending = CampaignStatus.new("Pending")
|
172
|
+
Suspended = CampaignStatus.new("Suspended")
|
173
|
+
end
|
174
|
+
|
175
|
+
# {https://adwords.google.com/api/adwords/v13}KeywordStatus
|
176
|
+
class KeywordStatus < ::String
|
177
|
+
Active = KeywordStatus.new("Active")
|
178
|
+
Deleted = KeywordStatus.new("Deleted")
|
179
|
+
Disapproved = KeywordStatus.new("Disapproved")
|
180
|
+
InActive = KeywordStatus.new("InActive")
|
181
|
+
Paused = KeywordStatus.new("Paused")
|
182
|
+
end
|
183
|
+
|
184
|
+
# {https://adwords.google.com/api/adwords/v13}KeywordType
|
185
|
+
class KeywordType < ::String
|
186
|
+
Broad = KeywordType.new("Broad")
|
187
|
+
Exact = KeywordType.new("Exact")
|
188
|
+
Phrase = KeywordType.new("Phrase")
|
189
|
+
end
|
190
|
+
|
191
|
+
# {https://adwords.google.com/api/adwords/v13}ReportJobStatus
|
192
|
+
class ReportJobStatus < ::String
|
193
|
+
Completed = ReportJobStatus.new("Completed")
|
194
|
+
Failed = ReportJobStatus.new("Failed")
|
195
|
+
InProgress = ReportJobStatus.new("InProgress")
|
196
|
+
Pending = ReportJobStatus.new("Pending")
|
197
|
+
end
|
198
|
+
|
199
|
+
# {https://adwords.google.com/api/adwords/v13}deleteReport
|
200
|
+
# reportJobId - SOAP::SOAPLong
|
201
|
+
class DeleteReport
|
202
|
+
attr_accessor :reportJobId
|
203
|
+
|
204
|
+
def initialize(reportJobId = nil)
|
205
|
+
@reportJobId = reportJobId
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
# {https://adwords.google.com/api/adwords/v13}deleteReportResponse
|
210
|
+
class DeleteReportResponse
|
211
|
+
def initialize
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# {https://adwords.google.com/api/adwords/v13}getAllJobs
|
216
|
+
class GetAllJobs
|
217
|
+
def initialize
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
# {https://adwords.google.com/api/adwords/v13}getAllJobsResponse
|
222
|
+
class GetAllJobsResponse < ::Array
|
223
|
+
end
|
224
|
+
|
225
|
+
# {https://adwords.google.com/api/adwords/v13}getGzipReportDownloadUrl
|
226
|
+
# reportJobId - SOAP::SOAPLong
|
227
|
+
class GetGzipReportDownloadUrl
|
228
|
+
attr_accessor :reportJobId
|
229
|
+
|
230
|
+
def initialize(reportJobId = nil)
|
231
|
+
@reportJobId = reportJobId
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# {https://adwords.google.com/api/adwords/v13}getGzipReportDownloadUrlResponse
|
236
|
+
# getGzipReportDownloadUrlReturn - SOAP::SOAPString
|
237
|
+
class GetGzipReportDownloadUrlResponse
|
238
|
+
attr_accessor :getGzipReportDownloadUrlReturn
|
239
|
+
|
240
|
+
def initialize(getGzipReportDownloadUrlReturn = nil)
|
241
|
+
@getGzipReportDownloadUrlReturn = getGzipReportDownloadUrlReturn
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
# {https://adwords.google.com/api/adwords/v13}getReportDownloadUrl
|
246
|
+
# reportJobId - SOAP::SOAPLong
|
247
|
+
class GetReportDownloadUrl
|
248
|
+
attr_accessor :reportJobId
|
249
|
+
|
250
|
+
def initialize(reportJobId = nil)
|
251
|
+
@reportJobId = reportJobId
|
252
|
+
end
|
253
|
+
end
|
254
|
+
|
255
|
+
# {https://adwords.google.com/api/adwords/v13}getReportDownloadUrlResponse
|
256
|
+
# getReportDownloadUrlReturn - SOAP::SOAPString
|
257
|
+
class GetReportDownloadUrlResponse
|
258
|
+
attr_accessor :getReportDownloadUrlReturn
|
259
|
+
|
260
|
+
def initialize(getReportDownloadUrlReturn = nil)
|
261
|
+
@getReportDownloadUrlReturn = getReportDownloadUrlReturn
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
# {https://adwords.google.com/api/adwords/v13}getReportJobStatus
|
266
|
+
# reportJobId - SOAP::SOAPLong
|
267
|
+
class GetReportJobStatus
|
268
|
+
attr_accessor :reportJobId
|
269
|
+
|
270
|
+
def initialize(reportJobId = nil)
|
271
|
+
@reportJobId = reportJobId
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
# {https://adwords.google.com/api/adwords/v13}getReportJobStatusResponse
|
276
|
+
# getReportJobStatusReturn - AdWords::ReportService::ReportJobStatus
|
277
|
+
class GetReportJobStatusResponse
|
278
|
+
attr_accessor :getReportJobStatusReturn
|
279
|
+
|
280
|
+
def initialize(getReportJobStatusReturn = nil)
|
281
|
+
@getReportJobStatusReturn = getReportJobStatusReturn
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
# {https://adwords.google.com/api/adwords/v13}scheduleReportJob
|
286
|
+
# job - AdWords::ReportService::ReportJob
|
287
|
+
class ScheduleReportJob
|
288
|
+
attr_accessor :job
|
289
|
+
|
290
|
+
def initialize(job = nil)
|
291
|
+
@job = job
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
# {https://adwords.google.com/api/adwords/v13}scheduleReportJobResponse
|
296
|
+
# scheduleReportJobReturn - SOAP::SOAPLong
|
297
|
+
class ScheduleReportJobResponse
|
298
|
+
attr_accessor :scheduleReportJobReturn
|
299
|
+
|
300
|
+
def initialize(scheduleReportJobReturn = nil)
|
301
|
+
@scheduleReportJobReturn = scheduleReportJobReturn
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
# {https://adwords.google.com/api/adwords/v13}validateReportJob
|
306
|
+
# job - AdWords::ReportService::ReportJob
|
307
|
+
class ValidateReportJob
|
308
|
+
attr_accessor :job
|
309
|
+
|
310
|
+
def initialize(job = nil)
|
311
|
+
@job = job
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
315
|
+
# {https://adwords.google.com/api/adwords/v13}validateReportJobResponse
|
316
|
+
class ValidateReportJobResponse
|
317
|
+
def initialize
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
|
322
|
+
end; end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
require 'adwords4r/v13/ReportService'
|
2
|
+
require 'adwords4r/v13/ReportServiceMappingRegistry'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module AdWords
|
6
|
+
module ReportService
|
7
|
+
|
8
|
+
class ReportInterface < ::SOAP::RPC::Driver
|
9
|
+
DefaultEndpointUrl = "https://adwords.google.com/api/adwords/v13/ReportService"
|
10
|
+
|
11
|
+
Methods = [
|
12
|
+
[ "",
|
13
|
+
"deleteReport",
|
14
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "deleteReport"]],
|
15
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "deleteReportResponse"]] ],
|
16
|
+
{ :request_style => :document, :request_use => :literal,
|
17
|
+
:response_style => :document, :response_use => :literal,
|
18
|
+
:faults => {"AdWords::ReportService::ApiException"=>{:encodingstyle=>"document", :name=>"ApiException", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v13", :use=>"literal"}} }
|
19
|
+
],
|
20
|
+
[ "",
|
21
|
+
"getAllJobs",
|
22
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getAllJobs"]],
|
23
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getAllJobsResponse"]] ],
|
24
|
+
{ :request_style => :document, :request_use => :literal,
|
25
|
+
:response_style => :document, :response_use => :literal,
|
26
|
+
:faults => {"AdWords::ReportService::ApiException"=>{:encodingstyle=>"document", :name=>"ApiException", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v13", :use=>"literal"}} }
|
27
|
+
],
|
28
|
+
[ "",
|
29
|
+
"getGzipReportDownloadUrl",
|
30
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getGzipReportDownloadUrl"]],
|
31
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getGzipReportDownloadUrlResponse"]] ],
|
32
|
+
{ :request_style => :document, :request_use => :literal,
|
33
|
+
:response_style => :document, :response_use => :literal,
|
34
|
+
:faults => {"AdWords::ReportService::ApiException"=>{:encodingstyle=>"document", :name=>"ApiException", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v13", :use=>"literal"}} }
|
35
|
+
],
|
36
|
+
[ "",
|
37
|
+
"getReportDownloadUrl",
|
38
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getReportDownloadUrl"]],
|
39
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getReportDownloadUrlResponse"]] ],
|
40
|
+
{ :request_style => :document, :request_use => :literal,
|
41
|
+
:response_style => :document, :response_use => :literal,
|
42
|
+
:faults => {"AdWords::ReportService::ApiException"=>{:encodingstyle=>"document", :name=>"ApiException", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v13", :use=>"literal"}} }
|
43
|
+
],
|
44
|
+
[ "",
|
45
|
+
"getReportJobStatus",
|
46
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getReportJobStatus"]],
|
47
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "getReportJobStatusResponse"]] ],
|
48
|
+
{ :request_style => :document, :request_use => :literal,
|
49
|
+
:response_style => :document, :response_use => :literal,
|
50
|
+
:faults => {"AdWords::ReportService::ApiException"=>{:encodingstyle=>"document", :name=>"ApiException", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v13", :use=>"literal"}} }
|
51
|
+
],
|
52
|
+
[ "",
|
53
|
+
"scheduleReportJob",
|
54
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "scheduleReportJob"]],
|
55
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "scheduleReportJobResponse"]] ],
|
56
|
+
{ :request_style => :document, :request_use => :literal,
|
57
|
+
:response_style => :document, :response_use => :literal,
|
58
|
+
:faults => {"AdWords::ReportService::ApiException"=>{:encodingstyle=>"document", :name=>"ApiException", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v13", :use=>"literal"}} }
|
59
|
+
],
|
60
|
+
[ "",
|
61
|
+
"validateReportJob",
|
62
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "validateReportJob"]],
|
63
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v13", "validateReportJobResponse"]] ],
|
64
|
+
{ :request_style => :document, :request_use => :literal,
|
65
|
+
:response_style => :document, :response_use => :literal,
|
66
|
+
:faults => {"AdWords::ReportService::ApiException"=>{:encodingstyle=>"document", :name=>"ApiException", :namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v13", :use=>"literal"}} }
|
67
|
+
]
|
68
|
+
]
|
69
|
+
|
70
|
+
def initialize(endpoint_url = nil)
|
71
|
+
endpoint_url ||= DefaultEndpointUrl
|
72
|
+
super(endpoint_url, nil)
|
73
|
+
self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
|
74
|
+
self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
|
75
|
+
init_methods
|
76
|
+
end
|
77
|
+
|
78
|
+
private
|
79
|
+
|
80
|
+
def init_methods
|
81
|
+
Methods.each do |definitions|
|
82
|
+
opt = definitions.last
|
83
|
+
if opt[:request_style] == :document
|
84
|
+
add_document_operation(*definitions)
|
85
|
+
else
|
86
|
+
add_rpc_operation(*definitions)
|
87
|
+
qname = definitions[0]
|
88
|
+
name = definitions[2]
|
89
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
90
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
91
|
+
__send__(name, *arg)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,298 @@
|
|
1
|
+
require 'adwords4r/v13/ReportService'
|
2
|
+
require 'soap/mapping'
|
3
|
+
|
4
|
+
module AdWords; module ReportService
|
5
|
+
|
6
|
+
module DefaultMappingRegistry
|
7
|
+
EncodedRegistry = ::SOAP::Mapping::EncodedRegistry.new
|
8
|
+
LiteralRegistry = ::SOAP::Mapping::LiteralRegistry.new
|
9
|
+
NsV13 = "https://adwords.google.com/api/adwords/v13"
|
10
|
+
|
11
|
+
EncodedRegistry.register(
|
12
|
+
:class => AdWords::ReportService::ApiError,
|
13
|
+
:schema_type => XSD::QName.new(NsV13, "ApiError"),
|
14
|
+
:schema_element => [
|
15
|
+
["code", "SOAP::SOAPInt"],
|
16
|
+
["detail", "SOAP::SOAPString"],
|
17
|
+
["field", "SOAP::SOAPString", [0, 1]],
|
18
|
+
["index", "SOAP::SOAPInt"],
|
19
|
+
["isExemptable", "SOAP::SOAPBoolean"],
|
20
|
+
["textIndex", "SOAP::SOAPInt", [0, 1]],
|
21
|
+
["textLength", "SOAP::SOAPInt", [0, 1]],
|
22
|
+
["trigger", "SOAP::SOAPString", [0, 1]]
|
23
|
+
]
|
24
|
+
)
|
25
|
+
|
26
|
+
EncodedRegistry.register(
|
27
|
+
:class => AdWords::ReportService::ApiException,
|
28
|
+
:schema_type => XSD::QName.new(NsV13, "ApiException"),
|
29
|
+
:schema_element => [
|
30
|
+
["code", "SOAP::SOAPInt"],
|
31
|
+
["errors", "AdWords::ReportService::ApiError[]", [1, nil]],
|
32
|
+
["internal", "SOAP::SOAPBoolean"],
|
33
|
+
["message", "SOAP::SOAPString"],
|
34
|
+
["trigger", "SOAP::SOAPString"]
|
35
|
+
]
|
36
|
+
)
|
37
|
+
|
38
|
+
EncodedRegistry.register(
|
39
|
+
:class => AdWords::ReportService::DefinedReportJob,
|
40
|
+
:schema_type => XSD::QName.new(NsV13, "DefinedReportJob"),
|
41
|
+
:schema_basetype => XSD::QName.new(NsV13, "ReportJob"),
|
42
|
+
:schema_element => [
|
43
|
+
["clientEmails", "SOAP::SOAPString[]", [0, nil]],
|
44
|
+
["crossClient", "SOAP::SOAPBoolean", [0, 1]],
|
45
|
+
["endDay", "SOAP::SOAPDate"],
|
46
|
+
["id", "SOAP::SOAPLong", [0, 1]],
|
47
|
+
["name", "SOAP::SOAPString", [0, 1]],
|
48
|
+
["startDay", "SOAP::SOAPDate"],
|
49
|
+
["status", "AdWords::ReportService::ReportJobStatus", [0, 1]],
|
50
|
+
["adGroupStatuses", "AdWords::ReportService::AdGroupStatus[]", [0, nil]],
|
51
|
+
["adGroups", "SOAP::SOAPLong[]", [0, nil]],
|
52
|
+
["adWordsType", "AdWords::ReportService::AdWordsType", [0, 1]],
|
53
|
+
["aggregationTypes", "SOAP::SOAPString[]", [0, nil]],
|
54
|
+
["campaignStatuses", "AdWords::ReportService::CampaignStatus[]", [0, nil]],
|
55
|
+
["campaigns", "SOAP::SOAPInt[]", [0, nil]],
|
56
|
+
["includeZeroImpression", "SOAP::SOAPBoolean", [0, 1]],
|
57
|
+
["keywordStatuses", "AdWords::ReportService::KeywordStatus[]", [0, nil]],
|
58
|
+
["keywordType", "AdWords::ReportService::KeywordType", [0, 1]],
|
59
|
+
["keywords", "SOAP::SOAPString[]", [0, nil]],
|
60
|
+
["selectedColumns", "SOAP::SOAPString[]", [0, nil]],
|
61
|
+
["selectedReportType", "SOAP::SOAPString"]
|
62
|
+
]
|
63
|
+
)
|
64
|
+
|
65
|
+
EncodedRegistry.register(
|
66
|
+
:class => AdWords::ReportService::AdGroupStatus,
|
67
|
+
:schema_type => XSD::QName.new(NsV13, "AdGroupStatus")
|
68
|
+
)
|
69
|
+
|
70
|
+
EncodedRegistry.register(
|
71
|
+
:class => AdWords::ReportService::AdWordsType,
|
72
|
+
:schema_type => XSD::QName.new(NsV13, "AdWordsType")
|
73
|
+
)
|
74
|
+
|
75
|
+
EncodedRegistry.register(
|
76
|
+
:class => AdWords::ReportService::CampaignStatus,
|
77
|
+
:schema_type => XSD::QName.new(NsV13, "CampaignStatus")
|
78
|
+
)
|
79
|
+
|
80
|
+
EncodedRegistry.register(
|
81
|
+
:class => AdWords::ReportService::KeywordStatus,
|
82
|
+
:schema_type => XSD::QName.new(NsV13, "KeywordStatus")
|
83
|
+
)
|
84
|
+
|
85
|
+
EncodedRegistry.register(
|
86
|
+
:class => AdWords::ReportService::KeywordType,
|
87
|
+
:schema_type => XSD::QName.new(NsV13, "KeywordType")
|
88
|
+
)
|
89
|
+
|
90
|
+
EncodedRegistry.register(
|
91
|
+
:class => AdWords::ReportService::ReportJobStatus,
|
92
|
+
:schema_type => XSD::QName.new(NsV13, "ReportJobStatus")
|
93
|
+
)
|
94
|
+
|
95
|
+
LiteralRegistry.register(
|
96
|
+
:class => AdWords::ReportService::ApiError,
|
97
|
+
:schema_type => XSD::QName.new(NsV13, "ApiError"),
|
98
|
+
:schema_element => [
|
99
|
+
["code", "SOAP::SOAPInt"],
|
100
|
+
["detail", "SOAP::SOAPString"],
|
101
|
+
["field", "SOAP::SOAPString", [0, 1]],
|
102
|
+
["index", "SOAP::SOAPInt"],
|
103
|
+
["isExemptable", "SOAP::SOAPBoolean"],
|
104
|
+
["textIndex", "SOAP::SOAPInt", [0, 1]],
|
105
|
+
["textLength", "SOAP::SOAPInt", [0, 1]],
|
106
|
+
["trigger", "SOAP::SOAPString", [0, 1]]
|
107
|
+
]
|
108
|
+
)
|
109
|
+
|
110
|
+
LiteralRegistry.register(
|
111
|
+
:class => AdWords::ReportService::ApiException,
|
112
|
+
:schema_type => XSD::QName.new(NsV13, "ApiException"),
|
113
|
+
:schema_element => [
|
114
|
+
["code", "SOAP::SOAPInt"],
|
115
|
+
["errors", "AdWords::ReportService::ApiError[]", [1, nil]],
|
116
|
+
["internal", "SOAP::SOAPBoolean"],
|
117
|
+
["message", "SOAP::SOAPString"],
|
118
|
+
["trigger", "SOAP::SOAPString"]
|
119
|
+
]
|
120
|
+
)
|
121
|
+
|
122
|
+
LiteralRegistry.register(
|
123
|
+
:class => AdWords::ReportService::DefinedReportJob,
|
124
|
+
:schema_type => XSD::QName.new(NsV13, "DefinedReportJob"),
|
125
|
+
:schema_basetype => XSD::QName.new(NsV13, "ReportJob"),
|
126
|
+
:schema_element => [
|
127
|
+
["clientEmails", "SOAP::SOAPString[]", [0, nil]],
|
128
|
+
["crossClient", "SOAP::SOAPBoolean", [0, 1]],
|
129
|
+
["endDay", "SOAP::SOAPDate"],
|
130
|
+
["id", "SOAP::SOAPLong", [0, 1]],
|
131
|
+
["name", "SOAP::SOAPString", [0, 1]],
|
132
|
+
["startDay", "SOAP::SOAPDate"],
|
133
|
+
["status", "AdWords::ReportService::ReportJobStatus", [0, 1]],
|
134
|
+
["adGroupStatuses", "AdWords::ReportService::AdGroupStatus[]", [0, nil]],
|
135
|
+
["adGroups", "SOAP::SOAPLong[]", [0, nil]],
|
136
|
+
["adWordsType", "AdWords::ReportService::AdWordsType", [0, 1]],
|
137
|
+
["aggregationTypes", "SOAP::SOAPString[]", [0, nil]],
|
138
|
+
["campaignStatuses", "AdWords::ReportService::CampaignStatus[]", [0, nil]],
|
139
|
+
["campaigns", "SOAP::SOAPInt[]", [0, nil]],
|
140
|
+
["includeZeroImpression", "SOAP::SOAPBoolean", [0, 1]],
|
141
|
+
["keywordStatuses", "AdWords::ReportService::KeywordStatus[]", [0, nil]],
|
142
|
+
["keywordType", "AdWords::ReportService::KeywordType", [0, 1]],
|
143
|
+
["keywords", "SOAP::SOAPString[]", [0, nil]],
|
144
|
+
["selectedColumns", "SOAP::SOAPString[]", [0, nil]],
|
145
|
+
["selectedReportType", "SOAP::SOAPString"]
|
146
|
+
]
|
147
|
+
)
|
148
|
+
|
149
|
+
LiteralRegistry.register(
|
150
|
+
:class => AdWords::ReportService::AdGroupStatus,
|
151
|
+
:schema_type => XSD::QName.new(NsV13, "AdGroupStatus")
|
152
|
+
)
|
153
|
+
|
154
|
+
LiteralRegistry.register(
|
155
|
+
:class => AdWords::ReportService::AdWordsType,
|
156
|
+
:schema_type => XSD::QName.new(NsV13, "AdWordsType")
|
157
|
+
)
|
158
|
+
|
159
|
+
LiteralRegistry.register(
|
160
|
+
:class => AdWords::ReportService::CampaignStatus,
|
161
|
+
:schema_type => XSD::QName.new(NsV13, "CampaignStatus")
|
162
|
+
)
|
163
|
+
|
164
|
+
LiteralRegistry.register(
|
165
|
+
:class => AdWords::ReportService::KeywordStatus,
|
166
|
+
:schema_type => XSD::QName.new(NsV13, "KeywordStatus")
|
167
|
+
)
|
168
|
+
|
169
|
+
LiteralRegistry.register(
|
170
|
+
:class => AdWords::ReportService::KeywordType,
|
171
|
+
:schema_type => XSD::QName.new(NsV13, "KeywordType")
|
172
|
+
)
|
173
|
+
|
174
|
+
LiteralRegistry.register(
|
175
|
+
:class => AdWords::ReportService::ReportJobStatus,
|
176
|
+
:schema_type => XSD::QName.new(NsV13, "ReportJobStatus")
|
177
|
+
)
|
178
|
+
|
179
|
+
LiteralRegistry.register(
|
180
|
+
:class => AdWords::ReportService::DeleteReport,
|
181
|
+
:schema_name => XSD::QName.new(NsV13, "deleteReport"),
|
182
|
+
:schema_element => [
|
183
|
+
["reportJobId", "SOAP::SOAPLong"]
|
184
|
+
]
|
185
|
+
)
|
186
|
+
|
187
|
+
LiteralRegistry.register(
|
188
|
+
:class => AdWords::ReportService::DeleteReportResponse,
|
189
|
+
:schema_name => XSD::QName.new(NsV13, "deleteReportResponse"),
|
190
|
+
:schema_element => []
|
191
|
+
)
|
192
|
+
|
193
|
+
LiteralRegistry.register(
|
194
|
+
:class => AdWords::ReportService::ApiException,
|
195
|
+
:schema_name => XSD::QName.new(NsV13, "fault"),
|
196
|
+
:schema_element => [
|
197
|
+
["code", "SOAP::SOAPInt"],
|
198
|
+
["errors", "AdWords::ReportService::ApiError[]", [1, nil]],
|
199
|
+
["internal", "SOAP::SOAPBoolean"],
|
200
|
+
["message", "SOAP::SOAPString"],
|
201
|
+
["trigger", "SOAP::SOAPString"]
|
202
|
+
]
|
203
|
+
)
|
204
|
+
|
205
|
+
LiteralRegistry.register(
|
206
|
+
:class => AdWords::ReportService::GetAllJobs,
|
207
|
+
:schema_name => XSD::QName.new(NsV13, "getAllJobs"),
|
208
|
+
:schema_element => []
|
209
|
+
)
|
210
|
+
|
211
|
+
LiteralRegistry.register(
|
212
|
+
:class => AdWords::ReportService::GetAllJobsResponse,
|
213
|
+
:schema_name => XSD::QName.new(NsV13, "getAllJobsResponse"),
|
214
|
+
:schema_element => [
|
215
|
+
["getAllJobsReturn", "AdWords::ReportService::ReportJob[]", [1, nil]]
|
216
|
+
]
|
217
|
+
)
|
218
|
+
|
219
|
+
LiteralRegistry.register(
|
220
|
+
:class => AdWords::ReportService::GetGzipReportDownloadUrl,
|
221
|
+
:schema_name => XSD::QName.new(NsV13, "getGzipReportDownloadUrl"),
|
222
|
+
:schema_element => [
|
223
|
+
["reportJobId", "SOAP::SOAPLong"]
|
224
|
+
]
|
225
|
+
)
|
226
|
+
|
227
|
+
LiteralRegistry.register(
|
228
|
+
:class => AdWords::ReportService::GetGzipReportDownloadUrlResponse,
|
229
|
+
:schema_name => XSD::QName.new(NsV13, "getGzipReportDownloadUrlResponse"),
|
230
|
+
:schema_element => [
|
231
|
+
["getGzipReportDownloadUrlReturn", "SOAP::SOAPString"]
|
232
|
+
]
|
233
|
+
)
|
234
|
+
|
235
|
+
LiteralRegistry.register(
|
236
|
+
:class => AdWords::ReportService::GetReportDownloadUrl,
|
237
|
+
:schema_name => XSD::QName.new(NsV13, "getReportDownloadUrl"),
|
238
|
+
:schema_element => [
|
239
|
+
["reportJobId", "SOAP::SOAPLong"]
|
240
|
+
]
|
241
|
+
)
|
242
|
+
|
243
|
+
LiteralRegistry.register(
|
244
|
+
:class => AdWords::ReportService::GetReportDownloadUrlResponse,
|
245
|
+
:schema_name => XSD::QName.new(NsV13, "getReportDownloadUrlResponse"),
|
246
|
+
:schema_element => [
|
247
|
+
["getReportDownloadUrlReturn", "SOAP::SOAPString"]
|
248
|
+
]
|
249
|
+
)
|
250
|
+
|
251
|
+
LiteralRegistry.register(
|
252
|
+
:class => AdWords::ReportService::GetReportJobStatus,
|
253
|
+
:schema_name => XSD::QName.new(NsV13, "getReportJobStatus"),
|
254
|
+
:schema_element => [
|
255
|
+
["reportJobId", "SOAP::SOAPLong"]
|
256
|
+
]
|
257
|
+
)
|
258
|
+
|
259
|
+
LiteralRegistry.register(
|
260
|
+
:class => AdWords::ReportService::GetReportJobStatusResponse,
|
261
|
+
:schema_name => XSD::QName.new(NsV13, "getReportJobStatusResponse"),
|
262
|
+
:schema_element => [
|
263
|
+
["getReportJobStatusReturn", "AdWords::ReportService::ReportJobStatus"]
|
264
|
+
]
|
265
|
+
)
|
266
|
+
|
267
|
+
LiteralRegistry.register(
|
268
|
+
:class => AdWords::ReportService::ScheduleReportJob,
|
269
|
+
:schema_name => XSD::QName.new(NsV13, "scheduleReportJob"),
|
270
|
+
:schema_element => [
|
271
|
+
["job", "AdWords::ReportService::ReportJob"]
|
272
|
+
]
|
273
|
+
)
|
274
|
+
|
275
|
+
LiteralRegistry.register(
|
276
|
+
:class => AdWords::ReportService::ScheduleReportJobResponse,
|
277
|
+
:schema_name => XSD::QName.new(NsV13, "scheduleReportJobResponse"),
|
278
|
+
:schema_element => [
|
279
|
+
["scheduleReportJobReturn", "SOAP::SOAPLong"]
|
280
|
+
]
|
281
|
+
)
|
282
|
+
|
283
|
+
LiteralRegistry.register(
|
284
|
+
:class => AdWords::ReportService::ValidateReportJob,
|
285
|
+
:schema_name => XSD::QName.new(NsV13, "validateReportJob"),
|
286
|
+
:schema_element => [
|
287
|
+
["job", "AdWords::ReportService::ReportJob"]
|
288
|
+
]
|
289
|
+
)
|
290
|
+
|
291
|
+
LiteralRegistry.register(
|
292
|
+
:class => AdWords::ReportService::ValidateReportJobResponse,
|
293
|
+
:schema_name => XSD::QName.new(NsV13, "validateReportJobResponse"),
|
294
|
+
:schema_element => []
|
295
|
+
)
|
296
|
+
end
|
297
|
+
|
298
|
+
end; end
|