ysm4r 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. data/Authors.txt +2 -0
  2. data/ChangeLog.txt +1 -0
  3. data/License.txt +13 -0
  4. data/Rakefile +209 -0
  5. data/Readme.txt +4 -0
  6. data/clean.sh +3 -0
  7. data/lib/soapex/driver.rb +13 -0
  8. data/lib/soapex/error.rb +49 -0
  9. data/lib/soapex/mapping.rb +31 -0
  10. data/lib/soapex/wsdl2ruby.rb +166 -0
  11. data/lib/ysm4r.rb +4 -0
  12. data/lib/ysm4r/client.rb +120 -0
  13. data/lib/ysm4r/service.rb +68 -0
  14. data/lib/ysm4r/v1/AccountService.rb +370 -0
  15. data/lib/ysm4r/v1/AccountServiceDriver.rb +162 -0
  16. data/lib/ysm4r/v1/AccountServiceMappingRegistry.rb +509 -0
  17. data/lib/ysm4r/v1/AdGroupService.rb +649 -0
  18. data/lib/ysm4r/v1/AdGroupServiceDriver.rb +226 -0
  19. data/lib/ysm4r/v1/AdGroupServiceMappingRegistry.rb +864 -0
  20. data/lib/ysm4r/v1/AdService.rb +533 -0
  21. data/lib/ysm4r/v1/AdServiceDriver.rb +178 -0
  22. data/lib/ysm4r/v1/AdServiceMappingRegistry.rb +753 -0
  23. data/lib/ysm4r/v1/BasicReportService.rb +259 -0
  24. data/lib/ysm4r/v1/BasicReportServiceDriver.rb +98 -0
  25. data/lib/ysm4r/v1/BasicReportServiceMappingRegistry.rb +389 -0
  26. data/lib/ysm4r/v1/BidInformationService.rb +69 -0
  27. data/lib/ysm4r/v1/BidInformationServiceDriver.rb +50 -0
  28. data/lib/ysm4r/v1/BidInformationServiceMappingRegistry.rb +135 -0
  29. data/lib/ysm4r/v1/BudgetingService.rb +161 -0
  30. data/lib/ysm4r/v1/BudgetingServiceDriver.rb +98 -0
  31. data/lib/ysm4r/v1/BudgetingServiceMappingRegistry.rb +230 -0
  32. data/lib/ysm4r/v1/CampaignService.rb +644 -0
  33. data/lib/ysm4r/v1/CampaignServiceDriver.rb +210 -0
  34. data/lib/ysm4r/v1/CampaignServiceMappingRegistry.rb +909 -0
  35. data/lib/ysm4r/v1/ExcludedWordsService.rb +294 -0
  36. data/lib/ysm4r/v1/ExcludedWordsServiceDriver.rb +122 -0
  37. data/lib/ysm4r/v1/ExcludedWordsServiceMappingRegistry.rb +469 -0
  38. data/lib/ysm4r/v1/ForecastService.rb +200 -0
  39. data/lib/ysm4r/v1/ForecastServiceDriver.rb +66 -0
  40. data/lib/ysm4r/v1/ForecastServiceMappingRegistry.rb +359 -0
  41. data/lib/ysm4r/v1/KeywordResearchService.rb +290 -0
  42. data/lib/ysm4r/v1/KeywordResearchServiceDriver.rb +66 -0
  43. data/lib/ysm4r/v1/KeywordResearchServiceMappingRegistry.rb +548 -0
  44. data/lib/ysm4r/v1/KeywordService.rb +671 -0
  45. data/lib/ysm4r/v1/KeywordServiceDriver.rb +218 -0
  46. data/lib/ysm4r/v1/KeywordServiceMappingRegistry.rb +913 -0
  47. data/lib/ysm4r/v1/LocationService.rb +53 -0
  48. data/lib/ysm4r/v1/LocationServiceDriver.rb +50 -0
  49. data/lib/ysm4r/v1/LocationServiceMappingRegistry.rb +111 -0
  50. data/lib/ysm4r/v1/MasterAccountService.rb +289 -0
  51. data/lib/ysm4r/v1/MasterAccountServiceDriver.rb +74 -0
  52. data/lib/ysm4r/v1/MasterAccountServiceMappingRegistry.rb +414 -0
  53. data/lib/ysm4r/v1/UpgradeService.rb +72 -0
  54. data/lib/ysm4r/v1/UpgradeServiceDriver.rb +58 -0
  55. data/lib/ysm4r/v1/UpgradeServiceMappingRegistry.rb +145 -0
  56. data/lib/ysm4r/v1/UserManagementService.rb +766 -0
  57. data/lib/ysm4r/v1/UserManagementServiceDriver.rb +290 -0
  58. data/lib/ysm4r/v1/UserManagementServiceMappingRegistry.rb +1057 -0
  59. data/lib/ysm4r/v1/sandbox/LocationService.rb +53 -0
  60. data/lib/ysm4r/v1/sandbox/LocationServiceDriver.rb +50 -0
  61. data/lib/ysm4r/v1/sandbox/LocationServiceMappingRegistry.rb +111 -0
  62. data/lib/ysm4r/v1/sandbox/UpgradeService.rb +72 -0
  63. data/lib/ysm4r/v1/sandbox/UpgradeServiceDriver.rb +58 -0
  64. data/lib/ysm4r/v1/sandbox/UpgradeServiceMappingRegistry.rb +145 -0
  65. data/lib/ysm4r/v2/AccountService.rb +372 -0
  66. data/lib/ysm4r/v2/AccountServiceDriver.rb +162 -0
  67. data/lib/ysm4r/v2/AccountServiceMappingRegistry.rb +510 -0
  68. data/lib/ysm4r/v2/AdGroupService.rb +649 -0
  69. data/lib/ysm4r/v2/AdGroupServiceDriver.rb +226 -0
  70. data/lib/ysm4r/v2/AdGroupServiceMappingRegistry.rb +864 -0
  71. data/lib/ysm4r/v2/AdService.rb +553 -0
  72. data/lib/ysm4r/v2/AdServiceDriver.rb +186 -0
  73. data/lib/ysm4r/v2/AdServiceMappingRegistry.rb +774 -0
  74. data/lib/ysm4r/v2/BasicReportService.rb +272 -0
  75. data/lib/ysm4r/v2/BasicReportServiceDriver.rb +98 -0
  76. data/lib/ysm4r/v2/BasicReportServiceMappingRegistry.rb +389 -0
  77. data/lib/ysm4r/v2/BidInformationService.rb +109 -0
  78. data/lib/ysm4r/v2/BidInformationServiceDriver.rb +66 -0
  79. data/lib/ysm4r/v2/BidInformationServiceMappingRegistry.rb +177 -0
  80. data/lib/ysm4r/v2/BudgetingService.rb +161 -0
  81. data/lib/ysm4r/v2/BudgetingServiceDriver.rb +98 -0
  82. data/lib/ysm4r/v2/BudgetingServiceMappingRegistry.rb +230 -0
  83. data/lib/ysm4r/v2/CampaignService.rb +644 -0
  84. data/lib/ysm4r/v2/CampaignServiceDriver.rb +210 -0
  85. data/lib/ysm4r/v2/CampaignServiceMappingRegistry.rb +909 -0
  86. data/lib/ysm4r/v2/CompanyService.rb +68 -0
  87. data/lib/ysm4r/v2/CompanyServiceDriver.rb +50 -0
  88. data/lib/ysm4r/v2/CompanyServiceMappingRegistry.rb +136 -0
  89. data/lib/ysm4r/v2/ExcludedWordsService.rb +294 -0
  90. data/lib/ysm4r/v2/ExcludedWordsServiceDriver.rb +122 -0
  91. data/lib/ysm4r/v2/ExcludedWordsServiceMappingRegistry.rb +469 -0
  92. data/lib/ysm4r/v2/ForecastService.rb +200 -0
  93. data/lib/ysm4r/v2/ForecastServiceDriver.rb +66 -0
  94. data/lib/ysm4r/v2/ForecastServiceMappingRegistry.rb +359 -0
  95. data/lib/ysm4r/v2/KeywordResearchService.rb +369 -0
  96. data/lib/ysm4r/v2/KeywordResearchServiceDriver.rb +82 -0
  97. data/lib/ysm4r/v2/KeywordResearchServiceMappingRegistry.rb +673 -0
  98. data/lib/ysm4r/v2/KeywordService.rb +691 -0
  99. data/lib/ysm4r/v2/KeywordServiceDriver.rb +226 -0
  100. data/lib/ysm4r/v2/KeywordServiceMappingRegistry.rb +934 -0
  101. data/lib/ysm4r/v2/LocationService.rb +53 -0
  102. data/lib/ysm4r/v2/LocationServiceDriver.rb +50 -0
  103. data/lib/ysm4r/v2/LocationServiceMappingRegistry.rb +111 -0
  104. data/lib/ysm4r/v2/MasterAccountService.rb +332 -0
  105. data/lib/ysm4r/v2/MasterAccountServiceDriver.rb +82 -0
  106. data/lib/ysm4r/v2/MasterAccountServiceMappingRegistry.rb +480 -0
  107. data/lib/ysm4r/v2/UpgradeService.rb +72 -0
  108. data/lib/ysm4r/v2/UpgradeServiceDriver.rb +58 -0
  109. data/lib/ysm4r/v2/UpgradeServiceMappingRegistry.rb +145 -0
  110. data/lib/ysm4r/v2/UserManagementService.rb +766 -0
  111. data/lib/ysm4r/v2/UserManagementServiceDriver.rb +290 -0
  112. data/lib/ysm4r/v2/UserManagementServiceMappingRegistry.rb +1057 -0
  113. data/lib/ysm4r/v2/sandbox/LocationService.rb +53 -0
  114. data/lib/ysm4r/v2/sandbox/LocationServiceDriver.rb +50 -0
  115. data/lib/ysm4r/v2/sandbox/LocationServiceMappingRegistry.rb +111 -0
  116. data/lib/ysm4r/v2/sandbox/UpgradeService.rb +72 -0
  117. data/lib/ysm4r/v2/sandbox/UpgradeServiceDriver.rb +58 -0
  118. data/lib/ysm4r/v2/sandbox/UpgradeServiceMappingRegistry.rb +145 -0
  119. data/setup.rb +1585 -0
  120. data/test/test_campaign_service.rb +12 -0
  121. data/test/test_keyword_research_service.rb +15 -0
  122. data/test/test_master_account_service.rb +18 -0
  123. data/ysm.properties +6 -0
  124. metadata +171 -0
@@ -0,0 +1,272 @@
1
+ require 'xsd/qname'
2
+
3
+ module YSM::BasicReportService
4
+
5
+
6
+ # {http://marketing.ews.yahooapis.com/V2}FileOutputFormat
7
+ class FileOutputFormat
8
+ attr_accessor :fileOutputType
9
+ attr_accessor :zipped
10
+
11
+ def initialize(fileOutputType = nil, zipped = nil)
12
+ @fileOutputType = fileOutputType
13
+ @zipped = zipped
14
+ end
15
+ end
16
+
17
+ # {http://marketing.ews.yahooapis.com/V2}ApiFault
18
+ class ApiFault < ::StandardError
19
+ attr_accessor :code
20
+ attr_accessor :message
21
+
22
+ def initialize(code = nil, message = nil)
23
+ @code = code
24
+ @message = message
25
+ end
26
+ end
27
+
28
+ # {http://marketing.ews.yahooapis.com/V2}BasicReportRequest
29
+ class BasicReportRequest
30
+ attr_accessor :dateRange
31
+ attr_accessor :endDate
32
+ attr_accessor :reportName
33
+ attr_accessor :reportType
34
+ attr_accessor :startDate
35
+
36
+ def initialize(dateRange = nil, endDate = nil, reportName = nil, reportType = nil, startDate = nil)
37
+ @dateRange = dateRange
38
+ @endDate = endDate
39
+ @reportName = reportName
40
+ @reportType = reportType
41
+ @startDate = startDate
42
+ end
43
+ end
44
+
45
+ # {http://marketing.ews.yahooapis.com/V2}ArrayOfInt
46
+ class ArrayOfInt < ::Array
47
+ end
48
+
49
+ # {http://marketing.ews.yahooapis.com/V2}ArrayOfReportInfo
50
+ class ArrayOfReportInfo < ::Array
51
+ end
52
+
53
+ # {http://marketing.ews.yahooapis.com/V2}ReportInfo
54
+ class ReportInfo
55
+ attr_accessor :createDate
56
+ attr_accessor :reportID
57
+ attr_accessor :reportName
58
+ attr_accessor :status
59
+
60
+ def initialize(createDate = nil, reportID = nil, reportName = nil, status = nil)
61
+ @createDate = createDate
62
+ @reportID = reportID
63
+ @reportName = reportName
64
+ @status = status
65
+ end
66
+ end
67
+
68
+ # {http://marketing.ews.yahooapis.com/V2}ArrayOfString
69
+ class ArrayOfString < ::Array
70
+ end
71
+
72
+ # {http://schemas.xmlsoap.org/ws/2002/07/secext}Security
73
+ class Security
74
+ attr_accessor :usernameToken
75
+
76
+ def initialize(usernameToken = nil)
77
+ @usernameToken = usernameToken
78
+ end
79
+ end
80
+
81
+ # {http://schemas.xmlsoap.org/ws/2002/07/secext}UsernameToken
82
+ class UsernameToken
83
+ attr_accessor :username
84
+ attr_accessor :password
85
+
86
+ def initialize(username = nil, password = nil)
87
+ @username = username
88
+ @password = password
89
+ end
90
+ end
91
+
92
+ # {http://marketing.ews.yahooapis.com/V2}FileOutputType
93
+ class FileOutputType < ::String
94
+ CSV = FileOutputType.new("CSV")
95
+ CSV_EXCEL = FileOutputType.new("CSV_EXCEL")
96
+ TSV = FileOutputType.new("TSV")
97
+ XML = FileOutputType.new("XML")
98
+ end
99
+
100
+ # {http://marketing.ews.yahooapis.com/V2}BasicReportType
101
+ class BasicReportType < ::String
102
+ AccountSummary = BasicReportType.new("AccountSummary")
103
+ AccountSummaryByDay = BasicReportType.new("AccountSummaryByDay")
104
+ AdGroupSummary = BasicReportType.new("AdGroupSummary")
105
+ AdGroupSummaryByDay = BasicReportType.new("AdGroupSummaryByDay")
106
+ AdKeywordSummary = BasicReportType.new("AdKeywordSummary")
107
+ AdKeywordSummaryByDay = BasicReportType.new("AdKeywordSummaryByDay")
108
+ AdSummary = BasicReportType.new("AdSummary")
109
+ AdSummaryByDay = BasicReportType.new("AdSummaryByDay")
110
+ AdvancedAdKeywordPerformance = BasicReportType.new("AdvancedAdKeywordPerformance")
111
+ AdvancedAdKeywordPerformanceByDay = BasicReportType.new("AdvancedAdKeywordPerformanceByDay")
112
+ AdvancedAdPerformance = BasicReportType.new("AdvancedAdPerformance")
113
+ AdvancedAdPerformanceByDay = BasicReportType.new("AdvancedAdPerformanceByDay")
114
+ BillingTransactionDetail = BasicReportType.new("BillingTransactionDetail")
115
+ CampaignSummary = BasicReportType.new("CampaignSummary")
116
+ CampaignSummaryByDay = BasicReportType.new("CampaignSummaryByDay")
117
+ DailySummary = BasicReportType.new("DailySummary")
118
+ KeywordSummary = BasicReportType.new("KeywordSummary")
119
+ KeywordSummaryByDay = BasicReportType.new("KeywordSummaryByDay")
120
+ MultiChannelAccount = BasicReportType.new("MultiChannelAccount")
121
+ MultiChannelAccountByDay = BasicReportType.new("MultiChannelAccountByDay")
122
+ MultiChannelAdGroup = BasicReportType.new("MultiChannelAdGroup")
123
+ MultiChannelAdGroupByDay = BasicReportType.new("MultiChannelAdGroupByDay")
124
+ MultiChannelCampaign = BasicReportType.new("MultiChannelCampaign")
125
+ MultiChannelCampaignByDay = BasicReportType.new("MultiChannelCampaignByDay")
126
+ MultiChannelDaily = BasicReportType.new("MultiChannelDaily")
127
+ MultiChannelMarketingActivity = BasicReportType.new("MultiChannelMarketingActivity")
128
+ MultiChannelMarketingActivityByDay = BasicReportType.new("MultiChannelMarketingActivityByDay")
129
+ end
130
+
131
+ # {http://marketing.ews.yahooapis.com/V2}DateRange
132
+ class DateRange < ::String
133
+ Last30Days = DateRange.new("Last30Days")
134
+ Last7Days = DateRange.new("Last7Days")
135
+ LastBusinessWeek = DateRange.new("LastBusinessWeek")
136
+ LastCalendarMonth = DateRange.new("LastCalendarMonth")
137
+ LastCalendarQuarter = DateRange.new("LastCalendarQuarter")
138
+ LastCalendarWeek = DateRange.new("LastCalendarWeek")
139
+ MonthToDate = DateRange.new("MonthToDate")
140
+ WeekToDate = DateRange.new("WeekToDate")
141
+ YearToDate = DateRange.new("YearToDate")
142
+ Yesterday = DateRange.new("Yesterday")
143
+ end
144
+
145
+ # {http://marketing.ews.yahooapis.com/V2}getReportOutputUrl
146
+ class GetReportOutputUrl
147
+ attr_accessor :reportID
148
+ attr_accessor :fileFormat
149
+
150
+ def initialize(reportID = nil, fileFormat = nil)
151
+ @reportID = reportID
152
+ @fileFormat = fileFormat
153
+ end
154
+ end
155
+
156
+ # {http://marketing.ews.yahooapis.com/V2}getReportOutputUrlResponse
157
+ class GetReportOutputUrlResponse
158
+ attr_accessor :out
159
+
160
+ def initialize(out = nil)
161
+ @out = out
162
+ end
163
+ end
164
+
165
+ # {http://marketing.ews.yahooapis.com/V2}addReportRequestWithAccountAggregation
166
+ class AddReportRequestWithAccountAggregation
167
+ attr_accessor :reportRequest
168
+
169
+ def initialize(reportRequest = nil)
170
+ @reportRequest = reportRequest
171
+ end
172
+ end
173
+
174
+ # {http://marketing.ews.yahooapis.com/V2}addReportRequestWithAccountAggregationResponse
175
+ class AddReportRequestWithAccountAggregationResponse
176
+ attr_accessor :out
177
+
178
+ def initialize(out = nil)
179
+ @out = out
180
+ end
181
+ end
182
+
183
+ # {http://marketing.ews.yahooapis.com/V2}addReportRequestForAccountID
184
+ class AddReportRequestForAccountID
185
+ attr_accessor :accountID
186
+ attr_accessor :reportRequest
187
+
188
+ def initialize(accountID = nil, reportRequest = nil)
189
+ @accountID = accountID
190
+ @reportRequest = reportRequest
191
+ end
192
+ end
193
+
194
+ # {http://marketing.ews.yahooapis.com/V2}addReportRequestForAccountIDResponse
195
+ class AddReportRequestForAccountIDResponse
196
+ attr_accessor :out
197
+
198
+ def initialize(out = nil)
199
+ @out = out
200
+ end
201
+ end
202
+
203
+ # {http://marketing.ews.yahooapis.com/V2}deleteReports
204
+ class DeleteReports
205
+ attr_accessor :reportIDs
206
+
207
+ def initialize(reportIDs = nil)
208
+ @reportIDs = reportIDs
209
+ end
210
+ end
211
+
212
+ # {http://marketing.ews.yahooapis.com/V2}deleteReportsResponse
213
+ class DeleteReportsResponse
214
+ def initialize
215
+ end
216
+ end
217
+
218
+ # {http://marketing.ews.yahooapis.com/V2}deleteReport
219
+ class DeleteReport
220
+ attr_accessor :reportID
221
+
222
+ def initialize(reportID = nil)
223
+ @reportID = reportID
224
+ end
225
+ end
226
+
227
+ # {http://marketing.ews.yahooapis.com/V2}deleteReportResponse
228
+ class DeleteReportResponse
229
+ def initialize
230
+ end
231
+ end
232
+
233
+ # {http://marketing.ews.yahooapis.com/V2}getReportList
234
+ class GetReportList
235
+ attr_accessor :onlyCompleted
236
+
237
+ def initialize(onlyCompleted = nil)
238
+ @onlyCompleted = onlyCompleted
239
+ end
240
+ end
241
+
242
+ # {http://marketing.ews.yahooapis.com/V2}getReportListResponse
243
+ class GetReportListResponse
244
+ attr_accessor :out
245
+
246
+ def initialize(out = nil)
247
+ @out = out
248
+ end
249
+ end
250
+
251
+ # {http://marketing.ews.yahooapis.com/V2}getReportOutputUrls
252
+ class GetReportOutputUrls
253
+ attr_accessor :reportIDs
254
+ attr_accessor :fileFormat
255
+
256
+ def initialize(reportIDs = nil, fileFormat = nil)
257
+ @reportIDs = reportIDs
258
+ @fileFormat = fileFormat
259
+ end
260
+ end
261
+
262
+ # {http://marketing.ews.yahooapis.com/V2}getReportOutputUrlsResponse
263
+ class GetReportOutputUrlsResponse
264
+ attr_accessor :out
265
+
266
+ def initialize(out = nil)
267
+ @out = out
268
+ end
269
+ end
270
+
271
+
272
+ end
@@ -0,0 +1,98 @@
1
+ require 'ysm4r/v2/BasicReportServiceMappingRegistry'
2
+
3
+
4
+ module YSM::BasicReportService
5
+ require 'soap/rpc/driver'
6
+
7
+ class BasicReportService < ::SOAP::RPC::Driver
8
+ DefaultEndpointUrl = "https://USE_ADDRESS_RETURNED_BY_LOCATION_SERVICE/services/V2/BasicReportService"
9
+
10
+ Methods = [
11
+ [ "",
12
+ "getReportOutputUrl",
13
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getReportOutputUrl"]],
14
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getReportOutputUrlResponse"]] ],
15
+ { :request_style => :document, :request_use => :literal,
16
+ :response_style => :document, :response_use => :literal,
17
+ :faults => {"YSM::BasicReportService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} }
18
+ ],
19
+ [ "",
20
+ "addReportRequestWithAccountAggregation",
21
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "addReportRequestWithAccountAggregation"]],
22
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "addReportRequestWithAccountAggregationResponse"]] ],
23
+ { :request_style => :document, :request_use => :literal,
24
+ :response_style => :document, :response_use => :literal,
25
+ :faults => {"YSM::BasicReportService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} }
26
+ ],
27
+ [ "",
28
+ "addReportRequestForAccountID",
29
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "addReportRequestForAccountID"]],
30
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "addReportRequestForAccountIDResponse"]] ],
31
+ { :request_style => :document, :request_use => :literal,
32
+ :response_style => :document, :response_use => :literal,
33
+ :faults => {"YSM::BasicReportService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} }
34
+ ],
35
+ [ "",
36
+ "deleteReports",
37
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "deleteReports"]],
38
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "deleteReportsResponse"]] ],
39
+ { :request_style => :document, :request_use => :literal,
40
+ :response_style => :document, :response_use => :literal,
41
+ :faults => {"YSM::BasicReportService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} }
42
+ ],
43
+ [ "",
44
+ "deleteReport",
45
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "deleteReport"]],
46
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "deleteReportResponse"]] ],
47
+ { :request_style => :document, :request_use => :literal,
48
+ :response_style => :document, :response_use => :literal,
49
+ :faults => {"YSM::BasicReportService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} }
50
+ ],
51
+ [ "",
52
+ "getReportList",
53
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getReportList"]],
54
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getReportListResponse"]] ],
55
+ { :request_style => :document, :request_use => :literal,
56
+ :response_style => :document, :response_use => :literal,
57
+ :faults => {"YSM::BasicReportService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} }
58
+ ],
59
+ [ "",
60
+ "getReportOutputUrls",
61
+ [ ["in", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getReportOutputUrls"]],
62
+ ["out", "parameters", ["::SOAP::SOAPElement", "http://marketing.ews.yahooapis.com/V2", "getReportOutputUrlsResponse"]] ],
63
+ { :request_style => :document, :request_use => :literal,
64
+ :response_style => :document, :response_use => :literal,
65
+ :faults => {"YSM::BasicReportService::ApiFault"=>{:name=>"ApiFault", :encodingstyle=>"document", :namespace=>nil, :ns=>"http://marketing.ews.yahooapis.com/V2", :use=>"literal"}} }
66
+ ]
67
+ ]
68
+
69
+ def initialize(endpoint_url = nil)
70
+ endpoint_url ||= DefaultEndpointUrl
71
+ super(endpoint_url, nil)
72
+ self.mapping_registry = DefaultMappingRegistry::EncodedRegistry
73
+ self.literal_mapping_registry = DefaultMappingRegistry::LiteralRegistry
74
+ init_methods
75
+ end
76
+
77
+ private
78
+
79
+ def init_methods
80
+ Methods.each do |definitions|
81
+ opt = definitions.last
82
+ if opt[:request_style] == :document
83
+ add_document_operation(*definitions)
84
+ else
85
+ add_rpc_operation(*definitions)
86
+ qname = definitions[0]
87
+ name = definitions[2]
88
+ if qname.name != name and qname.name.capitalize == name.capitalize
89
+ ::SOAP::Mapping.define_singleton_method(self, qname.name) do |*arg|
90
+ __send__(name, *arg)
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
97
+
98
+ end
@@ -0,0 +1,389 @@
1
+ require 'ysm4r/v2/BasicReportService'
2
+ require 'soap/mapping'
3
+
4
+ module YSM; module BasicReportService
5
+
6
+ module DefaultMappingRegistry
7
+ EncodedRegistry = ::SOAP::Mapping::EncodedRegistry.new
8
+ LiteralRegistry = ::SOAP::Mapping::LiteralRegistry.new
9
+
10
+ EncodedRegistry.register(
11
+ :class => YSM::BasicReportService::FileOutputFormat,
12
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
13
+ :schema_type => "FileOutputFormat",
14
+ :schema_element => [
15
+ ["fileOutputType", "SOAP::SOAPString", [0, 1]],
16
+ ["zipped", "SOAP::SOAPBoolean", [0, 1]]
17
+ ]
18
+ )
19
+
20
+ EncodedRegistry.register(
21
+ :class => YSM::BasicReportService::ApiFault,
22
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
23
+ :schema_type => "ApiFault",
24
+ :schema_element => [
25
+ ["code", "SOAP::SOAPString", [0, 1]],
26
+ ["message", "SOAP::SOAPString", [0, 1]]
27
+ ]
28
+ )
29
+
30
+ EncodedRegistry.register(
31
+ :class => YSM::BasicReportService::BasicReportRequest,
32
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
33
+ :schema_type => "BasicReportRequest",
34
+ :schema_element => [
35
+ ["dateRange", "SOAP::SOAPString", [0, 1]],
36
+ ["endDate", "SOAP::SOAPDateTime", [0, 1]],
37
+ ["reportName", "SOAP::SOAPString", [0, 1]],
38
+ ["reportType", "SOAP::SOAPString", [0, 1]],
39
+ ["startDate", "SOAP::SOAPDateTime", [0, 1]]
40
+ ]
41
+ )
42
+
43
+ EncodedRegistry.set(
44
+ YSM::BasicReportService::ArrayOfInt,
45
+ ::SOAP::SOAPArray,
46
+ ::SOAP::Mapping::EncodedRegistry::TypedArrayFactory,
47
+ { :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "int") }
48
+ )
49
+
50
+ EncodedRegistry.set(
51
+ YSM::BasicReportService::ArrayOfReportInfo,
52
+ ::SOAP::SOAPArray,
53
+ ::SOAP::Mapping::EncodedRegistry::TypedArrayFactory,
54
+ { :type => XSD::QName.new("http://marketing.ews.yahooapis.com/V2", "ReportInfo") }
55
+ )
56
+
57
+ EncodedRegistry.register(
58
+ :class => YSM::BasicReportService::ReportInfo,
59
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
60
+ :schema_type => "ReportInfo",
61
+ :schema_element => [
62
+ ["createDate", "SOAP::SOAPDateTime", [0, 1]],
63
+ ["reportID", "SOAP::SOAPInt", [0, 1]],
64
+ ["reportName", "SOAP::SOAPString", [0, 1]],
65
+ ["status", "SOAP::SOAPString", [0, 1]]
66
+ ]
67
+ )
68
+
69
+ EncodedRegistry.set(
70
+ YSM::BasicReportService::ArrayOfString,
71
+ ::SOAP::SOAPArray,
72
+ ::SOAP::Mapping::EncodedRegistry::TypedArrayFactory,
73
+ { :type => XSD::QName.new("http://www.w3.org/2001/XMLSchema", "string") }
74
+ )
75
+
76
+ EncodedRegistry.register(
77
+ :class => YSM::BasicReportService::Security,
78
+ :schema_ns => "http://schemas.xmlsoap.org/ws/2002/07/secext",
79
+ :schema_type => "Security",
80
+ :schema_element => [
81
+ ["usernameToken", ["YSM::BasicReportService::UsernameToken", XSD::QName.new(nil, "UsernameToken")]]
82
+ ]
83
+ )
84
+
85
+ EncodedRegistry.register(
86
+ :class => YSM::BasicReportService::UsernameToken,
87
+ :schema_ns => "http://schemas.xmlsoap.org/ws/2002/07/secext",
88
+ :schema_type => "UsernameToken",
89
+ :schema_element => [
90
+ ["username", ["SOAP::SOAPString", XSD::QName.new(nil, "Username")]],
91
+ ["password", ["SOAP::SOAPString", XSD::QName.new(nil, "Password")]]
92
+ ]
93
+ )
94
+
95
+ EncodedRegistry.register(
96
+ :class => YSM::BasicReportService::FileOutputType,
97
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
98
+ :schema_type => "FileOutputType"
99
+ )
100
+
101
+ EncodedRegistry.register(
102
+ :class => YSM::BasicReportService::BasicReportType,
103
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
104
+ :schema_type => "BasicReportType"
105
+ )
106
+
107
+ EncodedRegistry.register(
108
+ :class => YSM::BasicReportService::DateRange,
109
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
110
+ :schema_type => "DateRange"
111
+ )
112
+
113
+ LiteralRegistry.register(
114
+ :class => YSM::BasicReportService::FileOutputFormat,
115
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
116
+ :schema_type => "FileOutputFormat",
117
+ :schema_qualified => false,
118
+ :schema_element => [
119
+ ["fileOutputType", "SOAP::SOAPString", [0, 1]],
120
+ ["zipped", "SOAP::SOAPBoolean", [0, 1]]
121
+ ]
122
+ )
123
+
124
+ LiteralRegistry.register(
125
+ :class => YSM::BasicReportService::ApiFault,
126
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
127
+ :schema_type => "ApiFault",
128
+ :schema_qualified => false,
129
+ :schema_element => [
130
+ ["code", "SOAP::SOAPString", [0, 1]],
131
+ ["message", "SOAP::SOAPString", [0, 1]]
132
+ ]
133
+ )
134
+
135
+ LiteralRegistry.register(
136
+ :class => YSM::BasicReportService::BasicReportRequest,
137
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
138
+ :schema_type => "BasicReportRequest",
139
+ :schema_qualified => false,
140
+ :schema_element => [
141
+ ["dateRange", "SOAP::SOAPString", [0, 1]],
142
+ ["endDate", "SOAP::SOAPDateTime", [0, 1]],
143
+ ["reportName", "SOAP::SOAPString", [0, 1]],
144
+ ["reportType", "SOAP::SOAPString", [0, 1]],
145
+ ["startDate", "SOAP::SOAPDateTime", [0, 1]]
146
+ ]
147
+ )
148
+
149
+ LiteralRegistry.register(
150
+ :class => YSM::BasicReportService::ArrayOfInt,
151
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
152
+ :schema_type => "ArrayOfInt",
153
+ :schema_element => [
154
+ ["int", ["SOAP::SOAPInt[]", XSD::QName.new("http://marketing.ews.yahooapis.com/V2", "int")], [0, nil]]
155
+ ]
156
+ )
157
+
158
+ LiteralRegistry.register(
159
+ :class => YSM::BasicReportService::ArrayOfReportInfo,
160
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
161
+ :schema_type => "ArrayOfReportInfo",
162
+ :schema_element => [
163
+ ["ReportInfo", ["YSM::BasicReportService::ReportInfo[]", XSD::QName.new("http://marketing.ews.yahooapis.com/V2", "ReportInfo")], [0, nil]]
164
+ ]
165
+ )
166
+
167
+ LiteralRegistry.register(
168
+ :class => YSM::BasicReportService::ReportInfo,
169
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
170
+ :schema_type => "ReportInfo",
171
+ :schema_qualified => false,
172
+ :schema_element => [
173
+ ["createDate", "SOAP::SOAPDateTime", [0, 1]],
174
+ ["reportID", "SOAP::SOAPInt", [0, 1]],
175
+ ["reportName", "SOAP::SOAPString", [0, 1]],
176
+ ["status", "SOAP::SOAPString", [0, 1]]
177
+ ]
178
+ )
179
+
180
+ LiteralRegistry.register(
181
+ :class => YSM::BasicReportService::ArrayOfString,
182
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
183
+ :schema_type => "ArrayOfString",
184
+ :schema_element => [
185
+ ["string", ["SOAP::SOAPString[]", XSD::QName.new("http://marketing.ews.yahooapis.com/V2", "string")], [0, nil]]
186
+ ]
187
+ )
188
+
189
+ LiteralRegistry.register(
190
+ :class => YSM::BasicReportService::Security,
191
+ :schema_ns => "http://schemas.xmlsoap.org/ws/2002/07/secext",
192
+ :schema_type => "Security",
193
+ :schema_qualified => false,
194
+ :schema_element => [
195
+ ["usernameToken", ["YSM::BasicReportService::UsernameToken", XSD::QName.new(nil, "UsernameToken")]]
196
+ ]
197
+ )
198
+
199
+ LiteralRegistry.register(
200
+ :class => YSM::BasicReportService::UsernameToken,
201
+ :schema_ns => "http://schemas.xmlsoap.org/ws/2002/07/secext",
202
+ :schema_type => "UsernameToken",
203
+ :schema_qualified => false,
204
+ :schema_element => [
205
+ ["username", ["SOAP::SOAPString", XSD::QName.new(nil, "Username")]],
206
+ ["password", ["SOAP::SOAPString", XSD::QName.new(nil, "Password")]]
207
+ ]
208
+ )
209
+
210
+ LiteralRegistry.register(
211
+ :class => YSM::BasicReportService::FileOutputType,
212
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
213
+ :schema_type => "FileOutputType"
214
+ )
215
+
216
+ LiteralRegistry.register(
217
+ :class => YSM::BasicReportService::BasicReportType,
218
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
219
+ :schema_type => "BasicReportType"
220
+ )
221
+
222
+ LiteralRegistry.register(
223
+ :class => YSM::BasicReportService::DateRange,
224
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
225
+ :schema_type => "DateRange"
226
+ )
227
+
228
+ LiteralRegistry.register(
229
+ :class => YSM::BasicReportService::GetReportOutputUrl,
230
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
231
+ :schema_name => "getReportOutputUrl",
232
+ :schema_qualified => true,
233
+ :schema_element => [
234
+ ["reportID", "SOAP::SOAPInt"],
235
+ ["fileFormat", "YSM::BasicReportService::FileOutputFormat"]
236
+ ]
237
+ )
238
+
239
+ LiteralRegistry.register(
240
+ :class => YSM::BasicReportService::GetReportOutputUrlResponse,
241
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
242
+ :schema_name => "getReportOutputUrlResponse",
243
+ :schema_qualified => true,
244
+ :schema_element => [
245
+ ["out", "SOAP::SOAPString"]
246
+ ]
247
+ )
248
+
249
+ LiteralRegistry.register(
250
+ :class => YSM::BasicReportService::ApiFault,
251
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
252
+ :schema_name => "ApiFault",
253
+ :schema_qualified => true,
254
+ :schema_element => [
255
+ ["code", "SOAP::SOAPString", [0, 1]],
256
+ ["message", "SOAP::SOAPString", [0, 1]]
257
+ ]
258
+ )
259
+
260
+ LiteralRegistry.register(
261
+ :class => YSM::BasicReportService::AddReportRequestWithAccountAggregation,
262
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
263
+ :schema_name => "addReportRequestWithAccountAggregation",
264
+ :schema_qualified => true,
265
+ :schema_element => [
266
+ ["reportRequest", "YSM::BasicReportService::BasicReportRequest"]
267
+ ]
268
+ )
269
+
270
+ LiteralRegistry.register(
271
+ :class => YSM::BasicReportService::AddReportRequestWithAccountAggregationResponse,
272
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
273
+ :schema_name => "addReportRequestWithAccountAggregationResponse",
274
+ :schema_qualified => true,
275
+ :schema_element => [
276
+ ["out", "SOAP::SOAPInt"]
277
+ ]
278
+ )
279
+
280
+ LiteralRegistry.register(
281
+ :class => YSM::BasicReportService::AddReportRequestForAccountID,
282
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
283
+ :schema_name => "addReportRequestForAccountID",
284
+ :schema_qualified => true,
285
+ :schema_element => [
286
+ ["accountID", "SOAP::SOAPString"],
287
+ ["reportRequest", "YSM::BasicReportService::BasicReportRequest"]
288
+ ]
289
+ )
290
+
291
+ LiteralRegistry.register(
292
+ :class => YSM::BasicReportService::AddReportRequestForAccountIDResponse,
293
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
294
+ :schema_name => "addReportRequestForAccountIDResponse",
295
+ :schema_qualified => true,
296
+ :schema_element => [
297
+ ["out", "SOAP::SOAPInt"]
298
+ ]
299
+ )
300
+
301
+ LiteralRegistry.register(
302
+ :class => YSM::BasicReportService::DeleteReports,
303
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
304
+ :schema_name => "deleteReports",
305
+ :schema_qualified => true,
306
+ :schema_element => [
307
+ ["reportIDs", "YSM::BasicReportService::ArrayOfInt"]
308
+ ]
309
+ )
310
+
311
+ LiteralRegistry.register(
312
+ :class => YSM::BasicReportService::DeleteReportsResponse,
313
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
314
+ :schema_name => "deleteReportsResponse",
315
+ :schema_qualified => true,
316
+ :schema_element => []
317
+ )
318
+
319
+ LiteralRegistry.register(
320
+ :class => YSM::BasicReportService::DeleteReport,
321
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
322
+ :schema_name => "deleteReport",
323
+ :schema_qualified => true,
324
+ :schema_element => [
325
+ ["reportID", "SOAP::SOAPInt"]
326
+ ]
327
+ )
328
+
329
+ LiteralRegistry.register(
330
+ :class => YSM::BasicReportService::DeleteReportResponse,
331
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
332
+ :schema_name => "deleteReportResponse",
333
+ :schema_qualified => true,
334
+ :schema_element => []
335
+ )
336
+
337
+ LiteralRegistry.register(
338
+ :class => YSM::BasicReportService::GetReportList,
339
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
340
+ :schema_name => "getReportList",
341
+ :schema_qualified => true,
342
+ :schema_element => [
343
+ ["onlyCompleted", "SOAP::SOAPBoolean"]
344
+ ]
345
+ )
346
+
347
+ LiteralRegistry.register(
348
+ :class => YSM::BasicReportService::GetReportListResponse,
349
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
350
+ :schema_name => "getReportListResponse",
351
+ :schema_qualified => true,
352
+ :schema_element => [
353
+ ["out", "YSM::BasicReportService::ArrayOfReportInfo"]
354
+ ]
355
+ )
356
+
357
+ LiteralRegistry.register(
358
+ :class => YSM::BasicReportService::GetReportOutputUrls,
359
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
360
+ :schema_name => "getReportOutputUrls",
361
+ :schema_qualified => true,
362
+ :schema_element => [
363
+ ["reportIDs", "YSM::BasicReportService::ArrayOfInt"],
364
+ ["fileFormat", "YSM::BasicReportService::FileOutputFormat"]
365
+ ]
366
+ )
367
+
368
+ LiteralRegistry.register(
369
+ :class => YSM::BasicReportService::GetReportOutputUrlsResponse,
370
+ :schema_ns => "http://marketing.ews.yahooapis.com/V2",
371
+ :schema_name => "getReportOutputUrlsResponse",
372
+ :schema_qualified => true,
373
+ :schema_element => [
374
+ ["out", "YSM::BasicReportService::ArrayOfString"]
375
+ ]
376
+ )
377
+
378
+ LiteralRegistry.register(
379
+ :class => YSM::BasicReportService::Security,
380
+ :schema_ns => "http://schemas.xmlsoap.org/ws/2002/07/secext",
381
+ :schema_name => "Security",
382
+ :schema_qualified => true,
383
+ :schema_element => [
384
+ ["usernameToken", ["YSM::BasicReportService::UsernameToken", XSD::QName.new(nil, "UsernameToken")]]
385
+ ]
386
+ )
387
+ end
388
+
389
+ end; end