adwords4r 0.7 → 11.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Authors.txt +3 -1
- data/ChangeLog.txt +18 -1
- data/Rakefile +35 -50
- data/Readme.txt +28 -11
- data/Todo.txt +1 -9
- data/adwords.properties +7 -7
- data/examples/campaign.rb +7 -5
- data/examples/framework.rb +3 -1
- data/examples/get_free_usage_this_month.rb +3 -1
- data/examples/get_unit_count.rb +7 -2
- data/examples/keyword_tool_demo.rb +5 -2
- data/examples/traffic_estimator.rb +5 -2
- data/lib/adwords4r.rb +157 -147
- data/lib/adwords4r/credentials.rb +36 -36
- data/lib/adwords4r/services.rb +24 -32
- data/lib/adwords4r/v10/AccountService.rb +234 -0
- data/lib/adwords4r/v10/AccountServiceDriver.rb +77 -0
- data/lib/adwords4r/v10/AccountServiceMappingRegistry.rb +258 -0
- data/lib/adwords4r/v10/AdGroupService.rb +257 -0
- data/lib/adwords4r/v10/AdGroupServiceDriver.rb +109 -0
- data/lib/adwords4r/v10/AdGroupServiceMappingRegistry.rb +276 -0
- data/lib/adwords4r/v10/AdService.rb +757 -0
- data/lib/adwords4r/v10/AdServiceDriver.rb +125 -0
- data/lib/adwords4r/v10/AdServiceMappingRegistry.rb +805 -0
- data/lib/adwords4r/v10/CampaignService.rb +443 -0
- data/lib/adwords4r/v10/CampaignServiceDriver.rb +125 -0
- data/lib/adwords4r/v10/CampaignServiceMappingRegistry.rb +564 -0
- data/lib/adwords4r/v10/CriterionService.rb +442 -0
- data/lib/adwords4r/v10/CriterionServiceDriver.rb +117 -0
- data/lib/adwords4r/v10/CriterionServiceMappingRegistry.rb +507 -0
- data/lib/adwords4r/v10/InfoService.rb +242 -0
- data/lib/adwords4r/v10/InfoServiceDriver.rb +109 -0
- data/lib/adwords4r/v10/InfoServiceMappingRegistry.rb +228 -0
- data/lib/adwords4r/v10/KeywordToolService.rb +205 -0
- data/lib/adwords4r/{v6 → v10}/KeywordToolServiceDriver.rb +18 -12
- data/lib/adwords4r/v10/KeywordToolServiceMappingRegistry.rb +227 -0
- data/lib/adwords4r/{v6 → v10}/ReportService.rb +335 -472
- data/lib/adwords4r/v10/ReportServiceDriver.rb +93 -0
- data/lib/adwords4r/v10/ReportServiceMappingRegistry.rb +559 -0
- data/lib/adwords4r/v10/SiteSuggestionService.rb +242 -0
- data/lib/adwords4r/v10/SiteSuggestionServiceDriver.rb +77 -0
- data/lib/adwords4r/v10/SiteSuggestionServiceMappingRegistry.rb +271 -0
- data/lib/adwords4r/v10/TrafficEstimatorService.rb +312 -0
- data/lib/adwords4r/v10/TrafficEstimatorServiceDriver.rb +77 -0
- data/lib/adwords4r/v10/TrafficEstimatorServiceMappingRegistry.rb +483 -0
- data/lib/adwords4r/v11/AccountService.rb +215 -0
- data/lib/adwords4r/v11/AccountServiceDriver.rb +69 -0
- data/lib/adwords4r/v11/AccountServiceMappingRegistry.rb +243 -0
- data/lib/adwords4r/v11/AdGroupService.rb +257 -0
- data/lib/adwords4r/v11/AdGroupServiceDriver.rb +109 -0
- data/lib/adwords4r/v11/AdGroupServiceMappingRegistry.rb +276 -0
- data/lib/adwords4r/v11/AdService.rb +760 -0
- data/lib/adwords4r/v11/AdServiceDriver.rb +125 -0
- data/lib/adwords4r/v11/AdServiceMappingRegistry.rb +807 -0
- data/lib/adwords4r/v11/CampaignService.rb +443 -0
- data/lib/adwords4r/v11/CampaignServiceDriver.rb +125 -0
- data/lib/adwords4r/v11/CampaignServiceMappingRegistry.rb +564 -0
- data/lib/adwords4r/v11/CriterionService.rb +442 -0
- data/lib/adwords4r/v11/CriterionServiceDriver.rb +117 -0
- data/lib/adwords4r/v11/CriterionServiceMappingRegistry.rb +507 -0
- data/lib/adwords4r/v11/InfoService.rb +242 -0
- data/lib/adwords4r/v11/InfoServiceDriver.rb +109 -0
- data/lib/adwords4r/v11/InfoServiceMappingRegistry.rb +228 -0
- data/lib/adwords4r/v11/KeywordToolService.rb +205 -0
- data/lib/adwords4r/{v5 → v11}/KeywordToolServiceDriver.rb +18 -12
- data/lib/adwords4r/v11/KeywordToolServiceMappingRegistry.rb +227 -0
- data/lib/adwords4r/v11/ReportService.rb +322 -0
- data/lib/adwords4r/v11/ReportServiceDriver.rb +101 -0
- data/lib/adwords4r/v11/ReportServiceMappingRegistry.rb +298 -0
- data/lib/adwords4r/v11/SiteSuggestionService.rb +242 -0
- data/lib/adwords4r/v11/SiteSuggestionServiceDriver.rb +77 -0
- data/lib/adwords4r/v11/SiteSuggestionServiceMappingRegistry.rb +271 -0
- data/lib/adwords4r/v11/TrafficEstimatorService.rb +312 -0
- data/lib/adwords4r/v11/TrafficEstimatorServiceDriver.rb +77 -0
- data/lib/adwords4r/v11/TrafficEstimatorServiceMappingRegistry.rb +483 -0
- metadata +96 -74
- data/lib/adwords4r/v4/AccountService.rb +0 -709
- data/lib/adwords4r/v4/AccountServiceDriver.rb +0 -174
- data/lib/adwords4r/v4/AdGroupService.rb +0 -316
- data/lib/adwords4r/v4/AdGroupServiceDriver.rb +0 -97
- data/lib/adwords4r/v4/CampaignService.rb +0 -527
- data/lib/adwords4r/v4/CampaignServiceDriver.rb +0 -111
- data/lib/adwords4r/v4/CreativeService.rb +0 -368
- data/lib/adwords4r/v4/CreativeServiceDriver.rb +0 -104
- data/lib/adwords4r/v4/CriterionService.rb +0 -411
- data/lib/adwords4r/v4/CriterionServiceDriver.rb +0 -97
- data/lib/adwords4r/v4/InfoService.rb +0 -260
- data/lib/adwords4r/v4/InfoServiceDriver.rb +0 -90
- data/lib/adwords4r/v4/KeywordService.rb +0 -543
- data/lib/adwords4r/v4/KeywordServiceDriver.rb +0 -125
- data/lib/adwords4r/v4/KeywordToolService.rb +0 -227
- data/lib/adwords4r/v4/KeywordToolServiceDriver.rb +0 -55
- data/lib/adwords4r/v4/ReportService.rb +0 -575
- data/lib/adwords4r/v4/ReportServiceDriver.rb +0 -83
- data/lib/adwords4r/v4/TrafficEstimatorService.rb +0 -274
- data/lib/adwords4r/v4/TrafficEstimatorServiceDriver.rb +0 -62
- data/lib/adwords4r/v5/AccountService.rb +0 -853
- data/lib/adwords4r/v5/AccountServiceDriver.rb +0 -188
- data/lib/adwords4r/v5/AdGroupService.rb +0 -352
- data/lib/adwords4r/v5/AdGroupServiceDriver.rb +0 -97
- data/lib/adwords4r/v5/CampaignService.rb +0 -563
- data/lib/adwords4r/v5/CampaignServiceDriver.rb +0 -111
- data/lib/adwords4r/v5/CreativeService.rb +0 -404
- data/lib/adwords4r/v5/CreativeServiceDriver.rb +0 -104
- data/lib/adwords4r/v5/CriterionService.rb +0 -447
- data/lib/adwords4r/v5/CriterionServiceDriver.rb +0 -97
- data/lib/adwords4r/v5/InfoService.rb +0 -296
- data/lib/adwords4r/v5/InfoServiceDriver.rb +0 -90
- data/lib/adwords4r/v5/KeywordToolService.rb +0 -263
- data/lib/adwords4r/v5/ReportService.rb +0 -788
- data/lib/adwords4r/v5/ReportServiceDriver.rb +0 -83
- data/lib/adwords4r/v5/TrafficEstimatorService.rb +0 -310
- data/lib/adwords4r/v5/TrafficEstimatorServiceDriver.rb +0 -62
- data/lib/adwords4r/v6/AccountService.rb +0 -853
- data/lib/adwords4r/v6/AccountServiceDriver.rb +0 -188
- data/lib/adwords4r/v6/AdGroupService.rb +0 -352
- data/lib/adwords4r/v6/AdGroupServiceDriver.rb +0 -97
- data/lib/adwords4r/v6/CampaignService.rb +0 -563
- data/lib/adwords4r/v6/CampaignServiceDriver.rb +0 -111
- data/lib/adwords4r/v6/CreativeService.rb +0 -472
- data/lib/adwords4r/v6/CreativeServiceDriver.rb +0 -111
- data/lib/adwords4r/v6/CriterionService.rb +0 -447
- data/lib/adwords4r/v6/CriterionServiceDriver.rb +0 -97
- data/lib/adwords4r/v6/InfoService.rb +0 -343
- data/lib/adwords4r/v6/InfoServiceDriver.rb +0 -97
- data/lib/adwords4r/v6/KeywordToolService.rb +0 -263
- data/lib/adwords4r/v6/ReportServiceDriver.rb +0 -83
- data/lib/adwords4r/v6/TrafficEstimatorService.rb +0 -310
- data/lib/adwords4r/v6/TrafficEstimatorServiceDriver.rb +0 -62
@@ -0,0 +1,242 @@
|
|
1
|
+
require 'xsd/qname'
|
2
|
+
|
3
|
+
module AdWords; module InfoService
|
4
|
+
|
5
|
+
|
6
|
+
# {https://adwords.google.com/api/adwords/v11}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/v11}ApiException
|
38
|
+
# code - SOAP::SOAPInt
|
39
|
+
# errors - AdWords::InfoService::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/v11}ClientUsageRecord
|
60
|
+
# clientEmail - SOAP::SOAPString
|
61
|
+
# quotaUnits - SOAP::SOAPLong
|
62
|
+
class ClientUsageRecord
|
63
|
+
attr_accessor :clientEmail
|
64
|
+
attr_accessor :quotaUnits
|
65
|
+
|
66
|
+
def initialize(clientEmail = nil, quotaUnits = nil)
|
67
|
+
@clientEmail = clientEmail
|
68
|
+
@quotaUnits = quotaUnits
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# {https://adwords.google.com/api/adwords/v11}getFreeUsageQuotaThisMonth
|
73
|
+
class GetFreeUsageQuotaThisMonth
|
74
|
+
def initialize
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# {https://adwords.google.com/api/adwords/v11}getFreeUsageQuotaThisMonthResponse
|
79
|
+
# getFreeUsageQuotaThisMonthReturn - SOAP::SOAPLong
|
80
|
+
class GetFreeUsageQuotaThisMonthResponse
|
81
|
+
attr_accessor :getFreeUsageQuotaThisMonthReturn
|
82
|
+
|
83
|
+
def initialize(getFreeUsageQuotaThisMonthReturn = nil)
|
84
|
+
@getFreeUsageQuotaThisMonthReturn = getFreeUsageQuotaThisMonthReturn
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# {https://adwords.google.com/api/adwords/v11}getMethodCost
|
89
|
+
# service - SOAP::SOAPString
|
90
|
+
# method - SOAP::SOAPString
|
91
|
+
# date - SOAP::SOAPDate
|
92
|
+
class GetMethodCost
|
93
|
+
attr_accessor :service
|
94
|
+
attr_accessor :method
|
95
|
+
attr_accessor :date
|
96
|
+
|
97
|
+
def initialize(service = nil, method = nil, date = nil)
|
98
|
+
@service = service
|
99
|
+
@method = method
|
100
|
+
@date = date
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
# {https://adwords.google.com/api/adwords/v11}getMethodCostResponse
|
105
|
+
# getMethodCostReturn - SOAP::SOAPInt
|
106
|
+
class GetMethodCostResponse
|
107
|
+
attr_accessor :getMethodCostReturn
|
108
|
+
|
109
|
+
def initialize(getMethodCostReturn = nil)
|
110
|
+
@getMethodCostReturn = getMethodCostReturn
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
# {https://adwords.google.com/api/adwords/v11}getOperationCount
|
115
|
+
# startDate - SOAP::SOAPDate
|
116
|
+
# endDate - SOAP::SOAPDate
|
117
|
+
class GetOperationCount
|
118
|
+
attr_accessor :startDate
|
119
|
+
attr_accessor :endDate
|
120
|
+
|
121
|
+
def initialize(startDate = nil, endDate = nil)
|
122
|
+
@startDate = startDate
|
123
|
+
@endDate = endDate
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
# {https://adwords.google.com/api/adwords/v11}getOperationCountResponse
|
128
|
+
# getOperationCountReturn - SOAP::SOAPLong
|
129
|
+
class GetOperationCountResponse
|
130
|
+
attr_accessor :getOperationCountReturn
|
131
|
+
|
132
|
+
def initialize(getOperationCountReturn = nil)
|
133
|
+
@getOperationCountReturn = getOperationCountReturn
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# {https://adwords.google.com/api/adwords/v11}getOperationsQuotaThisMonth
|
138
|
+
class GetOperationsQuotaThisMonth
|
139
|
+
def initialize
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
# {https://adwords.google.com/api/adwords/v11}getOperationsQuotaThisMonthResponse
|
144
|
+
# getOperationsQuotaThisMonthReturn - SOAP::SOAPLong
|
145
|
+
class GetOperationsQuotaThisMonthResponse
|
146
|
+
attr_accessor :getOperationsQuotaThisMonthReturn
|
147
|
+
|
148
|
+
def initialize(getOperationsQuotaThisMonthReturn = nil)
|
149
|
+
@getOperationsQuotaThisMonthReturn = getOperationsQuotaThisMonthReturn
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
# {https://adwords.google.com/api/adwords/v11}getUnitCount
|
154
|
+
# startDate - SOAP::SOAPDate
|
155
|
+
# endDate - SOAP::SOAPDate
|
156
|
+
class GetUnitCount
|
157
|
+
attr_accessor :startDate
|
158
|
+
attr_accessor :endDate
|
159
|
+
|
160
|
+
def initialize(startDate = nil, endDate = nil)
|
161
|
+
@startDate = startDate
|
162
|
+
@endDate = endDate
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
# {https://adwords.google.com/api/adwords/v11}getUnitCountForClients
|
167
|
+
# clientEmails - SOAP::SOAPString
|
168
|
+
# startDate - SOAP::SOAPDate
|
169
|
+
# endDate - SOAP::SOAPDate
|
170
|
+
class GetUnitCountForClients
|
171
|
+
attr_accessor :clientEmails
|
172
|
+
attr_accessor :startDate
|
173
|
+
attr_accessor :endDate
|
174
|
+
|
175
|
+
def initialize(clientEmails = [], startDate = nil, endDate = nil)
|
176
|
+
@clientEmails = clientEmails
|
177
|
+
@startDate = startDate
|
178
|
+
@endDate = endDate
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# {https://adwords.google.com/api/adwords/v11}getUnitCountForClientsResponse
|
183
|
+
class GetUnitCountForClientsResponse < ::Array
|
184
|
+
end
|
185
|
+
|
186
|
+
# {https://adwords.google.com/api/adwords/v11}getUnitCountForMethod
|
187
|
+
# service - SOAP::SOAPString
|
188
|
+
# method - SOAP::SOAPString
|
189
|
+
# startDate - SOAP::SOAPDate
|
190
|
+
# endDate - SOAP::SOAPDate
|
191
|
+
class GetUnitCountForMethod
|
192
|
+
attr_accessor :service
|
193
|
+
attr_accessor :method
|
194
|
+
attr_accessor :startDate
|
195
|
+
attr_accessor :endDate
|
196
|
+
|
197
|
+
def initialize(service = nil, method = nil, startDate = nil, endDate = nil)
|
198
|
+
@service = service
|
199
|
+
@method = method
|
200
|
+
@startDate = startDate
|
201
|
+
@endDate = endDate
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
# {https://adwords.google.com/api/adwords/v11}getUnitCountForMethodResponse
|
206
|
+
# getUnitCountForMethodReturn - SOAP::SOAPLong
|
207
|
+
class GetUnitCountForMethodResponse
|
208
|
+
attr_accessor :getUnitCountForMethodReturn
|
209
|
+
|
210
|
+
def initialize(getUnitCountForMethodReturn = nil)
|
211
|
+
@getUnitCountForMethodReturn = getUnitCountForMethodReturn
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# {https://adwords.google.com/api/adwords/v11}getUnitCountResponse
|
216
|
+
# getUnitCountReturn - SOAP::SOAPLong
|
217
|
+
class GetUnitCountResponse
|
218
|
+
attr_accessor :getUnitCountReturn
|
219
|
+
|
220
|
+
def initialize(getUnitCountReturn = nil)
|
221
|
+
@getUnitCountReturn = getUnitCountReturn
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
# {https://adwords.google.com/api/adwords/v11}getUsageQuotaThisMonth
|
226
|
+
class GetUsageQuotaThisMonth
|
227
|
+
def initialize
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
# {https://adwords.google.com/api/adwords/v11}getUsageQuotaThisMonthResponse
|
232
|
+
# getUsageQuotaThisMonthReturn - SOAP::SOAPLong
|
233
|
+
class GetUsageQuotaThisMonthResponse
|
234
|
+
attr_accessor :getUsageQuotaThisMonthReturn
|
235
|
+
|
236
|
+
def initialize(getUsageQuotaThisMonthReturn = nil)
|
237
|
+
@getUsageQuotaThisMonthReturn = getUsageQuotaThisMonthReturn
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
|
242
|
+
end; end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
require 'adwords4r/v11/InfoService'
|
2
|
+
require 'adwords4r/v11/InfoServiceMappingRegistry'
|
3
|
+
require 'soap/rpc/driver'
|
4
|
+
|
5
|
+
module AdWords
|
6
|
+
module InfoService
|
7
|
+
|
8
|
+
class InfoInterface < ::SOAP::RPC::Driver
|
9
|
+
DefaultEndpointUrl = "https://adwords.google.com/api/adwords/v11/InfoService"
|
10
|
+
|
11
|
+
Methods = [
|
12
|
+
[ "",
|
13
|
+
"getFreeUsageQuotaThisMonth",
|
14
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getFreeUsageQuotaThisMonth"]],
|
15
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getFreeUsageQuotaThisMonthResponse"]] ],
|
16
|
+
{ :request_style => :document, :request_use => :literal,
|
17
|
+
:response_style => :document, :response_use => :literal,
|
18
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
19
|
+
],
|
20
|
+
[ "",
|
21
|
+
"getMethodCost",
|
22
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getMethodCost"]],
|
23
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getMethodCostResponse"]] ],
|
24
|
+
{ :request_style => :document, :request_use => :literal,
|
25
|
+
:response_style => :document, :response_use => :literal,
|
26
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
27
|
+
],
|
28
|
+
[ "",
|
29
|
+
"getOperationCount",
|
30
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getOperationCount"]],
|
31
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getOperationCountResponse"]] ],
|
32
|
+
{ :request_style => :document, :request_use => :literal,
|
33
|
+
:response_style => :document, :response_use => :literal,
|
34
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
35
|
+
],
|
36
|
+
[ "",
|
37
|
+
"getOperationsQuotaThisMonth",
|
38
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getOperationsQuotaThisMonth"]],
|
39
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getOperationsQuotaThisMonthResponse"]] ],
|
40
|
+
{ :request_style => :document, :request_use => :literal,
|
41
|
+
:response_style => :document, :response_use => :literal,
|
42
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
43
|
+
],
|
44
|
+
[ "",
|
45
|
+
"getUnitCount",
|
46
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUnitCount"]],
|
47
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUnitCountResponse"]] ],
|
48
|
+
{ :request_style => :document, :request_use => :literal,
|
49
|
+
:response_style => :document, :response_use => :literal,
|
50
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
51
|
+
],
|
52
|
+
[ "",
|
53
|
+
"getUnitCountForClients",
|
54
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUnitCountForClients"]],
|
55
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUnitCountForClientsResponse"]] ],
|
56
|
+
{ :request_style => :document, :request_use => :literal,
|
57
|
+
:response_style => :document, :response_use => :literal,
|
58
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
59
|
+
],
|
60
|
+
[ "",
|
61
|
+
"getUnitCountForMethod",
|
62
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUnitCountForMethod"]],
|
63
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUnitCountForMethodResponse"]] ],
|
64
|
+
{ :request_style => :document, :request_use => :literal,
|
65
|
+
:response_style => :document, :response_use => :literal,
|
66
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
67
|
+
],
|
68
|
+
[ "",
|
69
|
+
"getUsageQuotaThisMonth",
|
70
|
+
[ ["in", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUsageQuotaThisMonth"]],
|
71
|
+
["out", "parameters", ["::SOAP::SOAPElement", "https://adwords.google.com/api/adwords/v11", "getUsageQuotaThisMonthResponse"]] ],
|
72
|
+
{ :request_style => :document, :request_use => :literal,
|
73
|
+
:response_style => :document, :response_use => :literal,
|
74
|
+
:faults => {"AdWords::InfoService::ApiException"=>{:namespace=>nil, :ns=>"https://adwords.google.com/api/adwords/v11", :encodingstyle=>"document", :use=>"literal", :name=>"ApiException"}} }
|
75
|
+
]
|
76
|
+
]
|
77
|
+
|
78
|
+
def initialize(endpoint_url = nil)
|
79
|
+
endpoint_url ||= DefaultEndpointUrl
|
80
|
+
super(endpoint_url, nil)
|
81
|
+
self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
|
82
|
+
self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
|
83
|
+
init_methods
|
84
|
+
end
|
85
|
+
|
86
|
+
private
|
87
|
+
|
88
|
+
def init_methods
|
89
|
+
Methods.each do |definitions|
|
90
|
+
opt = definitions.last
|
91
|
+
if opt[:request_style] == :document
|
92
|
+
add_document_operation(*definitions)
|
93
|
+
else
|
94
|
+
add_rpc_operation(*definitions)
|
95
|
+
qname = definitions[0]
|
96
|
+
name = definitions[2]
|
97
|
+
if qname.name != name and qname.name.capitalize == name.capitalize
|
98
|
+
::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
|
99
|
+
__send__(name, *arg)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,228 @@
|
|
1
|
+
require 'adwords4r/v11/InfoService'
|
2
|
+
require 'soap/mapping'
|
3
|
+
|
4
|
+
module AdWords; module InfoService
|
5
|
+
|
6
|
+
module DefaultMappingRegistry
|
7
|
+
EncodedRegistry = ::SOAP::Mapping::EncodedRegistry.new
|
8
|
+
LiteralRegistry = ::SOAP::Mapping::LiteralRegistry.new
|
9
|
+
NsV11 = "https://adwords.google.com/api/adwords/v11"
|
10
|
+
|
11
|
+
EncodedRegistry.register(
|
12
|
+
:class => AdWords::InfoService::ApiError,
|
13
|
+
:schema_type => XSD::QName.new(NsV11, "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::InfoService::ApiException,
|
28
|
+
:schema_type => XSD::QName.new(NsV11, "ApiException"),
|
29
|
+
:schema_element => [
|
30
|
+
["code", "SOAP::SOAPInt"],
|
31
|
+
["errors", "AdWords::InfoService::ApiError[]", [1, nil]],
|
32
|
+
["internal", "SOAP::SOAPBoolean"],
|
33
|
+
["message", "SOAP::SOAPString"],
|
34
|
+
["trigger", "SOAP::SOAPString"]
|
35
|
+
]
|
36
|
+
)
|
37
|
+
|
38
|
+
EncodedRegistry.register(
|
39
|
+
:class => AdWords::InfoService::ClientUsageRecord,
|
40
|
+
:schema_type => XSD::QName.new(NsV11, "ClientUsageRecord"),
|
41
|
+
:schema_element => [
|
42
|
+
["clientEmail", "SOAP::SOAPString"],
|
43
|
+
["quotaUnits", "SOAP::SOAPLong"]
|
44
|
+
]
|
45
|
+
)
|
46
|
+
|
47
|
+
LiteralRegistry.register(
|
48
|
+
:class => AdWords::InfoService::ApiError,
|
49
|
+
:schema_type => XSD::QName.new(NsV11, "ApiError"),
|
50
|
+
:schema_element => [
|
51
|
+
["code", "SOAP::SOAPInt"],
|
52
|
+
["detail", "SOAP::SOAPString"],
|
53
|
+
["field", "SOAP::SOAPString", [0, 1]],
|
54
|
+
["index", "SOAP::SOAPInt"],
|
55
|
+
["isExemptable", "SOAP::SOAPBoolean"],
|
56
|
+
["textIndex", "SOAP::SOAPInt", [0, 1]],
|
57
|
+
["textLength", "SOAP::SOAPInt", [0, 1]],
|
58
|
+
["trigger", "SOAP::SOAPString", [0, 1]]
|
59
|
+
]
|
60
|
+
)
|
61
|
+
|
62
|
+
LiteralRegistry.register(
|
63
|
+
:class => AdWords::InfoService::ApiException,
|
64
|
+
:schema_type => XSD::QName.new(NsV11, "ApiException"),
|
65
|
+
:schema_element => [
|
66
|
+
["code", "SOAP::SOAPInt"],
|
67
|
+
["errors", "AdWords::InfoService::ApiError[]", [1, nil]],
|
68
|
+
["internal", "SOAP::SOAPBoolean"],
|
69
|
+
["message", "SOAP::SOAPString"],
|
70
|
+
["trigger", "SOAP::SOAPString"]
|
71
|
+
]
|
72
|
+
)
|
73
|
+
|
74
|
+
LiteralRegistry.register(
|
75
|
+
:class => AdWords::InfoService::ClientUsageRecord,
|
76
|
+
:schema_type => XSD::QName.new(NsV11, "ClientUsageRecord"),
|
77
|
+
:schema_element => [
|
78
|
+
["clientEmail", "SOAP::SOAPString"],
|
79
|
+
["quotaUnits", "SOAP::SOAPLong"]
|
80
|
+
]
|
81
|
+
)
|
82
|
+
|
83
|
+
LiteralRegistry.register(
|
84
|
+
:class => AdWords::InfoService::ApiException,
|
85
|
+
:schema_name => XSD::QName.new(NsV11, "fault"),
|
86
|
+
:schema_element => [
|
87
|
+
["code", "SOAP::SOAPInt"],
|
88
|
+
["errors", "AdWords::InfoService::ApiError[]", [1, nil]],
|
89
|
+
["internal", "SOAP::SOAPBoolean"],
|
90
|
+
["message", "SOAP::SOAPString"],
|
91
|
+
["trigger", "SOAP::SOAPString"]
|
92
|
+
]
|
93
|
+
)
|
94
|
+
|
95
|
+
LiteralRegistry.register(
|
96
|
+
:class => AdWords::InfoService::GetFreeUsageQuotaThisMonth,
|
97
|
+
:schema_name => XSD::QName.new(NsV11, "getFreeUsageQuotaThisMonth"),
|
98
|
+
:schema_element => []
|
99
|
+
)
|
100
|
+
|
101
|
+
LiteralRegistry.register(
|
102
|
+
:class => AdWords::InfoService::GetFreeUsageQuotaThisMonthResponse,
|
103
|
+
:schema_name => XSD::QName.new(NsV11, "getFreeUsageQuotaThisMonthResponse"),
|
104
|
+
:schema_element => [
|
105
|
+
["getFreeUsageQuotaThisMonthReturn", "SOAP::SOAPLong"]
|
106
|
+
]
|
107
|
+
)
|
108
|
+
|
109
|
+
LiteralRegistry.register(
|
110
|
+
:class => AdWords::InfoService::GetMethodCost,
|
111
|
+
:schema_name => XSD::QName.new(NsV11, "getMethodCost"),
|
112
|
+
:schema_element => [
|
113
|
+
["service", "SOAP::SOAPString"],
|
114
|
+
["method", "SOAP::SOAPString"],
|
115
|
+
["date", "SOAP::SOAPDate"]
|
116
|
+
]
|
117
|
+
)
|
118
|
+
|
119
|
+
LiteralRegistry.register(
|
120
|
+
:class => AdWords::InfoService::GetMethodCostResponse,
|
121
|
+
:schema_name => XSD::QName.new(NsV11, "getMethodCostResponse"),
|
122
|
+
:schema_element => [
|
123
|
+
["getMethodCostReturn", "SOAP::SOAPInt"]
|
124
|
+
]
|
125
|
+
)
|
126
|
+
|
127
|
+
LiteralRegistry.register(
|
128
|
+
:class => AdWords::InfoService::GetOperationCount,
|
129
|
+
:schema_name => XSD::QName.new(NsV11, "getOperationCount"),
|
130
|
+
:schema_element => [
|
131
|
+
["startDate", "SOAP::SOAPDate"],
|
132
|
+
["endDate", "SOAP::SOAPDate"]
|
133
|
+
]
|
134
|
+
)
|
135
|
+
|
136
|
+
LiteralRegistry.register(
|
137
|
+
:class => AdWords::InfoService::GetOperationCountResponse,
|
138
|
+
:schema_name => XSD::QName.new(NsV11, "getOperationCountResponse"),
|
139
|
+
:schema_element => [
|
140
|
+
["getOperationCountReturn", "SOAP::SOAPLong"]
|
141
|
+
]
|
142
|
+
)
|
143
|
+
|
144
|
+
LiteralRegistry.register(
|
145
|
+
:class => AdWords::InfoService::GetOperationsQuotaThisMonth,
|
146
|
+
:schema_name => XSD::QName.new(NsV11, "getOperationsQuotaThisMonth"),
|
147
|
+
:schema_element => []
|
148
|
+
)
|
149
|
+
|
150
|
+
LiteralRegistry.register(
|
151
|
+
:class => AdWords::InfoService::GetOperationsQuotaThisMonthResponse,
|
152
|
+
:schema_name => XSD::QName.new(NsV11, "getOperationsQuotaThisMonthResponse"),
|
153
|
+
:schema_element => [
|
154
|
+
["getOperationsQuotaThisMonthReturn", "SOAP::SOAPLong"]
|
155
|
+
]
|
156
|
+
)
|
157
|
+
|
158
|
+
LiteralRegistry.register(
|
159
|
+
:class => AdWords::InfoService::GetUnitCount,
|
160
|
+
:schema_name => XSD::QName.new(NsV11, "getUnitCount"),
|
161
|
+
:schema_element => [
|
162
|
+
["startDate", "SOAP::SOAPDate"],
|
163
|
+
["endDate", "SOAP::SOAPDate"]
|
164
|
+
]
|
165
|
+
)
|
166
|
+
|
167
|
+
LiteralRegistry.register(
|
168
|
+
:class => AdWords::InfoService::GetUnitCountForClients,
|
169
|
+
:schema_name => XSD::QName.new(NsV11, "getUnitCountForClients"),
|
170
|
+
:schema_element => [
|
171
|
+
["clientEmails", "SOAP::SOAPString[]", [1, nil]],
|
172
|
+
["startDate", "SOAP::SOAPDate"],
|
173
|
+
["endDate", "SOAP::SOAPDate"]
|
174
|
+
]
|
175
|
+
)
|
176
|
+
|
177
|
+
LiteralRegistry.register(
|
178
|
+
:class => AdWords::InfoService::GetUnitCountForClientsResponse,
|
179
|
+
:schema_name => XSD::QName.new(NsV11, "getUnitCountForClientsResponse"),
|
180
|
+
:schema_element => [
|
181
|
+
["getUnitCountForClientsReturn", "AdWords::InfoService::ClientUsageRecord[]", [1, nil]]
|
182
|
+
]
|
183
|
+
)
|
184
|
+
|
185
|
+
LiteralRegistry.register(
|
186
|
+
:class => AdWords::InfoService::GetUnitCountForMethod,
|
187
|
+
:schema_name => XSD::QName.new(NsV11, "getUnitCountForMethod"),
|
188
|
+
:schema_element => [
|
189
|
+
["service", "SOAP::SOAPString"],
|
190
|
+
["method", "SOAP::SOAPString"],
|
191
|
+
["startDate", "SOAP::SOAPDate"],
|
192
|
+
["endDate", "SOAP::SOAPDate"]
|
193
|
+
]
|
194
|
+
)
|
195
|
+
|
196
|
+
LiteralRegistry.register(
|
197
|
+
:class => AdWords::InfoService::GetUnitCountForMethodResponse,
|
198
|
+
:schema_name => XSD::QName.new(NsV11, "getUnitCountForMethodResponse"),
|
199
|
+
:schema_element => [
|
200
|
+
["getUnitCountForMethodReturn", "SOAP::SOAPLong"]
|
201
|
+
]
|
202
|
+
)
|
203
|
+
|
204
|
+
LiteralRegistry.register(
|
205
|
+
:class => AdWords::InfoService::GetUnitCountResponse,
|
206
|
+
:schema_name => XSD::QName.new(NsV11, "getUnitCountResponse"),
|
207
|
+
:schema_element => [
|
208
|
+
["getUnitCountReturn", "SOAP::SOAPLong"]
|
209
|
+
]
|
210
|
+
)
|
211
|
+
|
212
|
+
LiteralRegistry.register(
|
213
|
+
:class => AdWords::InfoService::GetUsageQuotaThisMonth,
|
214
|
+
:schema_name => XSD::QName.new(NsV11, "getUsageQuotaThisMonth"),
|
215
|
+
:schema_element => []
|
216
|
+
)
|
217
|
+
|
218
|
+
LiteralRegistry.register(
|
219
|
+
:class => AdWords::InfoService::GetUsageQuotaThisMonthResponse,
|
220
|
+
:schema_name => XSD::QName.new(NsV11, "getUsageQuotaThisMonthResponse"),
|
221
|
+
:schema_element => [
|
222
|
+
["getUsageQuotaThisMonthReturn", "SOAP::SOAPLong"]
|
223
|
+
]
|
224
|
+
)
|
225
|
+
|
226
|
+
end
|
227
|
+
|
228
|
+
end; end
|