File Coverage

blib/lib/Microsoft/AdCenter/V8/ReportingService.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Microsoft::AdCenter::V8::ReportingService;
2             # Copyright (C) 2012 Xerxes Tsang
3             # This program is free software; you can redistribute it and/or modify it
4             # under the terms of Perl Artistic License.
5              
6 69     69   10198796 use strict;
  69         193  
  69         3101  
7 69     69   410 use warnings;
  69         211  
  69         3632  
8              
9             =head1 NAME
10              
11             Microsoft::AdCenter::V8::ReportingService - Service client for Microsoft AdCenter Reporting Service.
12              
13             =head1 SYNOPSIS
14              
15             use Microsoft::AdCenter::V8::ReportingService;
16              
17             my $service_client = Microsoft::AdCenter::V8::ReportingService->new
18             ->ApplicationToken("application token")
19             ->CustomerAccountId("customer account id")
20             ->CustomerId("customer id")
21             ->DeveloperToken("developer token")
22             ->Password("password")
23             ->UserName("user name");
24              
25             my $response = $service_client->PollGenerateReport(
26             ReportRequestId => ...
27             );
28              
29             See L for detailed documentation for this service.
30              
31             =head1 METHODS
32              
33             =head2 EndPoint
34              
35             Changes the end point for this service client.
36              
37             Default value: https://adcenterapi.microsoft.com/Api/Advertiser/V8/Reporting/ReportingService.svc
38              
39             =head2 ApplicationToken
40              
41             Gets/sets ApplicationToken (string) in the request header
42              
43             =head2 CustomerAccountId
44              
45             Gets/sets CustomerAccountId (string) in the request header
46              
47             =head2 CustomerId
48              
49             Gets/sets CustomerId (string) in the request header
50              
51             =head2 DeveloperToken
52              
53             Gets/sets DeveloperToken (string) in the request header
54              
55             =head2 Password
56              
57             Gets/sets Password (string) in the request header
58              
59             =head2 UserName
60              
61             Gets/sets UserName (string) in the request header
62              
63             =head2 TrackingId
64              
65             Gets TrackingId (string) in the response header
66              
67             =cut
68              
69 69     69   404 use base qw/Microsoft::AdCenter::Service/;
  69         152  
  69         67732  
70              
71             sub _service_name {
72             return 'ReportingService';
73             }
74              
75             sub _service_version {
76             return 'V8';
77             }
78              
79             sub _class_name {
80             return 'ReportingService';
81             }
82              
83             sub _namespace_uri {
84             return 'https://adcenter.microsoft.com/v8';
85             }
86              
87             sub _default_location {
88             return 'https://adcenterapi.microsoft.com/Api/Advertiser/V8/Reporting/ReportingService.svc';
89             }
90              
91             sub _wsdl {
92             return 'https://adcenterapi.microsoft.com/Api/Advertiser/v8/Reporting/ReportingService.svc?wsdl';
93             }
94              
95             our $_request_headers = [
96             { name => 'ApplicationToken', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' },
97             { name => 'CustomerAccountId', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' },
98             { name => 'CustomerId', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' },
99             { name => 'DeveloperToken', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' },
100             { name => 'Password', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' },
101             { name => 'UserName', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }
102             ];
103              
104             our $_request_headers_expanded = {
105             ApplicationToken => 'string',
106             CustomerAccountId => 'string',
107             CustomerId => 'string',
108             DeveloperToken => 'string',
109             Password => 'string',
110             UserName => 'string'
111             };
112              
113             sub _request_headers {
114             return $_request_headers;
115             }
116              
117             sub _request_headers_expanded {
118             return $_request_headers_expanded;
119             }
120              
121             our $_response_headers = [
122             { name => 'TrackingId', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }
123             ];
124              
125             our $_response_headers_expanded = {
126             TrackingId => 'string'
127             };
128              
129             sub _response_headers {
130             return $_response_headers;
131             }
132              
133             sub _response_headers_expanded {
134             return $_response_headers_expanded;
135             }
136              
137             =head2 PollGenerateReport
138              
139             =over
140              
141             =item Parameters:
142              
143             ReportRequestId (string)
144              
145             =item Returns:
146              
147             PollGenerateReportResponse
148              
149             =back
150              
151             =cut
152              
153             sub PollGenerateReport {
154             my ($self, %args) = @_;
155             return $self->_invoke(
156             soap_action => 'PollGenerateReport',
157             request => {
158             name => 'PollGenerateReportRequest',
159             parameters => [
160             { name => 'ReportRequestId', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }
161             ]
162             },
163             response => {
164             name => 'PollGenerateReportResponse'
165             },
166             parameters => \%args
167             );
168             }
169              
170             =head2 SubmitGenerateReport
171              
172             =over
173              
174             =item Parameters:
175              
176             ReportRequest (ReportRequest)
177              
178             =item Returns:
179              
180             SubmitGenerateReportResponse
181              
182             =back
183              
184             =cut
185              
186             sub SubmitGenerateReport {
187             my ($self, %args) = @_;
188             return $self->_invoke(
189             soap_action => 'SubmitGenerateReport',
190             request => {
191             name => 'SubmitGenerateReportRequest',
192             parameters => [
193             { name => 'ReportRequest', type => 'ReportRequest', namespace => 'https://adcenter.microsoft.com/v8' }
194             ]
195             },
196             response => {
197             name => 'SubmitGenerateReportResponse'
198             },
199             parameters => \%args
200             );
201             }
202              
203             our %_simple_types = (
204             AccountPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
205             AdDistributionReportFilter => 'https://adcenter.microsoft.com/v8',
206             AdDynamicTextPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
207             AdExtensionByAdsReportColumn => 'https://adcenter.microsoft.com/v8',
208             AdExtensionByKeywordReportColumn => 'https://adcenter.microsoft.com/v8',
209             AdExtensionDimensionReportColumn => 'https://adcenter.microsoft.com/v8',
210             AdGroupPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
211             AdGroupStatusReportFilter => 'https://adcenter.microsoft.com/v8',
212             AdPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
213             AdStatusReportFilter => 'https://adcenter.microsoft.com/v8',
214             AdTypeReportFilter => 'https://adcenter.microsoft.com/v8',
215             AgeGenderDemographicReportColumn => 'https://adcenter.microsoft.com/v8',
216             AgeGroupReportFilter => 'https://adcenter.microsoft.com/v8',
217             BehavioralPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
218             BehavioralTargetReportColumn => 'https://adcenter.microsoft.com/v8',
219             BidMatchTypeReportFilter => 'https://adcenter.microsoft.com/v8',
220             BudgetSummaryReportColumn => 'https://adcenter.microsoft.com/v8',
221             BudgetSummaryReportTimePeriod => 'https://adcenter.microsoft.com/v8',
222             CampaignPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
223             CampaignStatusReportFilter => 'https://adcenter.microsoft.com/v8',
224             CashbackReportFilter => 'https://adcenter.microsoft.com/v8',
225             ChangeEntityReportFilter => 'https://adcenter.microsoft.com/v8',
226             ChangeTypeReportFilter => 'https://adcenter.microsoft.com/v8',
227             ComponentTypeFilter => 'https://adcenter.microsoft.com/v8',
228             ConversionPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
229             CountryReportFilter => 'https://adcenter.microsoft.com/v8',
230             DeliveredMatchTypeReportFilter => 'https://adcenter.microsoft.com/v8',
231             DestinationUrlPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
232             DeviceTypeReportFilter => 'https://adcenter.microsoft.com/v8',
233             GenderReportFilter => 'https://adcenter.microsoft.com/v8',
234             GoalsAndFunnelsReportColumn => 'https://adcenter.microsoft.com/v8',
235             KeywordMigrationReportColumn => 'https://adcenter.microsoft.com/v8',
236             KeywordPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
237             LanguageAndRegionReportFilter => 'https://adcenter.microsoft.com/v8',
238             MetroAreaDemographicReportColumn => 'https://adcenter.microsoft.com/v8',
239             NegativeKeywordConflictReportColumn => 'https://adcenter.microsoft.com/v8',
240             NonHourlyReportAggregation => 'https://adcenter.microsoft.com/v8',
241             PublisherUsagePerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
242             ReportAggregation => 'https://adcenter.microsoft.com/v8',
243             ReportFormat => 'https://adcenter.microsoft.com/v8',
244             ReportLanguage => 'https://adcenter.microsoft.com/v8',
245             ReportRequestStatusType => 'https://adcenter.microsoft.com/v8',
246             ReportTimePeriod => 'https://adcenter.microsoft.com/v8',
247             RichAdComponentPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
248             RichAdSubTypeFilter => 'https://adcenter.microsoft.com/v8',
249             SearchCampaignChangeHistoryReportColumn => 'https://adcenter.microsoft.com/v8',
250             SearchQueryPerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
251             SearchQueryReportAggregation => 'https://adcenter.microsoft.com/v8',
252             SegmentationReportColumn => 'https://adcenter.microsoft.com/v8',
253             ShareOfVoiceReportColumn => 'https://adcenter.microsoft.com/v8',
254             SitePerformanceReportColumn => 'https://adcenter.microsoft.com/v8',
255             TacticChannelReportColumn => 'https://adcenter.microsoft.com/v8',
256             TrafficSourcesReportColumn => 'https://adcenter.microsoft.com/v8',
257             char => 'http://schemas.microsoft.com/2003/10/Serialization/',
258             duration => 'http://schemas.microsoft.com/2003/10/Serialization/',
259             guid => 'http://schemas.microsoft.com/2003/10/Serialization/',
260             );
261              
262             sub _simple_types {
263             return %_simple_types;
264             }
265              
266             our @_complex_types = (qw/
267             AccountPerformanceReportFilter
268             AccountPerformanceReportRequest
269             AccountReportScope
270             AccountThroughAdGroupReportScope
271             AccountThroughCampaignReportScope
272             AdApiError
273             AdApiFaultDetail
274             AdDynamicTextPerformanceReportFilter
275             AdDynamicTextPerformanceReportRequest
276             AdExtensionByAdsReportRequest
277             AdExtensionByKeywordReportRequest
278             AdExtensionDimensionReportRequest
279             AdGroupPerformanceReportFilter
280             AdGroupPerformanceReportRequest
281             AdGroupReportScope
282             AdPerformanceReportFilter
283             AdPerformanceReportRequest
284             AgeGenderDemographicReportFilter
285             AgeGenderDemographicReportRequest
286             ApiFaultDetail
287             ApplicationFault
288             BatchError
289             BehavioralPerformanceReportFilter
290             BehavioralPerformanceReportRequest
291             BehavioralTargetReportFilter
292             BehavioralTargetReportRequest
293             BudgetSummaryReportRequest
294             BudgetSummaryReportTime
295             CampaignPerformanceReportFilter
296             CampaignPerformanceReportRequest
297             CampaignReportScope
298             ConversionPerformanceReportFilter
299             ConversionPerformanceReportRequest
300             Date
301             DestinationUrlPerformanceReportFilter
302             DestinationUrlPerformanceReportRequest
303             GoalsAndFunnelsReportFilter
304             GoalsAndFunnelsReportRequest
305             KeywordMigrationReportRequest
306             KeywordPerformanceReportFilter
307             KeywordPerformanceReportRequest
308             MetroAreaDemographicReportFilter
309             MetroAreaDemographicReportRequest
310             NegativeKeywordConflictReportRequest
311             OperationError
312             PollGenerateReportResponse
313             PublisherUsagePerformanceReportFilter
314             PublisherUsagePerformanceReportRequest
315             ReportRequest
316             ReportRequestStatus
317             ReportTime
318             RichAdComponentPerformanceReportFilter
319             RichAdComponentPerformanceReportRequest
320             SearchCampaignChangeHistoryReportFilter
321             SearchCampaignChangeHistoryReportRequest
322             SearchQueryPerformanceReportFilter
323             SearchQueryPerformanceReportRequest
324             SegmentationReportFilter
325             SegmentationReportRequest
326             ShareOfVoiceReportFilter
327             ShareOfVoiceReportRequest
328             SitePerformanceReportFilter
329             SitePerformanceReportRequest
330             SubmitGenerateReportResponse
331             TacticChannelReportFilter
332             TacticChannelReportRequest
333             TrafficSourcesReportFilter
334             TrafficSourcesReportRequest
335             /);
336              
337             sub _complex_types {
338             return @_complex_types;
339             }
340              
341             our %_array_types = (
342             ArrayOfAccountPerformanceReportColumn => {
343             namespace_uri => 'https://adcenter.microsoft.com/v8',
344             element_name => 'AccountPerformanceReportColumn',
345             element_type => 'AccountPerformanceReportColumn'
346             },
347             ArrayOfAdApiError => {
348             namespace_uri => 'https://adapi.microsoft.com',
349             element_name => 'AdApiError',
350             element_type => 'AdApiError'
351             },
352             ArrayOfAdDynamicTextPerformanceReportColumn => {
353             namespace_uri => 'https://adcenter.microsoft.com/v8',
354             element_name => 'AdDynamicTextPerformanceReportColumn',
355             element_type => 'AdDynamicTextPerformanceReportColumn'
356             },
357             ArrayOfAdExtensionByAdsReportColumn => {
358             namespace_uri => 'https://adcenter.microsoft.com/v8',
359             element_name => 'AdExtensionByAdsReportColumn',
360             element_type => 'AdExtensionByAdsReportColumn'
361             },
362             ArrayOfAdExtensionByKeywordReportColumn => {
363             namespace_uri => 'https://adcenter.microsoft.com/v8',
364             element_name => 'AdExtensionByKeywordReportColumn',
365             element_type => 'AdExtensionByKeywordReportColumn'
366             },
367             ArrayOfAdExtensionDimensionReportColumn => {
368             namespace_uri => 'https://adcenter.microsoft.com/v8',
369             element_name => 'AdExtensionDimensionReportColumn',
370             element_type => 'AdExtensionDimensionReportColumn'
371             },
372             ArrayOfAdGroupPerformanceReportColumn => {
373             namespace_uri => 'https://adcenter.microsoft.com/v8',
374             element_name => 'AdGroupPerformanceReportColumn',
375             element_type => 'AdGroupPerformanceReportColumn'
376             },
377             ArrayOfAdGroupReportScope => {
378             namespace_uri => 'https://adcenter.microsoft.com/v8',
379             element_name => 'AdGroupReportScope',
380             element_type => 'AdGroupReportScope'
381             },
382             ArrayOfAdPerformanceReportColumn => {
383             namespace_uri => 'https://adcenter.microsoft.com/v8',
384             element_name => 'AdPerformanceReportColumn',
385             element_type => 'AdPerformanceReportColumn'
386             },
387             ArrayOfAgeGenderDemographicReportColumn => {
388             namespace_uri => 'https://adcenter.microsoft.com/v8',
389             element_name => 'AgeGenderDemographicReportColumn',
390             element_type => 'AgeGenderDemographicReportColumn'
391             },
392             ArrayOfBatchError => {
393             namespace_uri => 'https://adcenter.microsoft.com/v8',
394             element_name => 'BatchError',
395             element_type => 'BatchError'
396             },
397             ArrayOfBehavioralPerformanceReportColumn => {
398             namespace_uri => 'https://adcenter.microsoft.com/v8',
399             element_name => 'BehavioralPerformanceReportColumn',
400             element_type => 'BehavioralPerformanceReportColumn'
401             },
402             ArrayOfBehavioralTargetReportColumn => {
403             namespace_uri => 'https://adcenter.microsoft.com/v8',
404             element_name => 'BehavioralTargetReportColumn',
405             element_type => 'BehavioralTargetReportColumn'
406             },
407             ArrayOfBudgetSummaryReportColumn => {
408             namespace_uri => 'https://adcenter.microsoft.com/v8',
409             element_name => 'BudgetSummaryReportColumn',
410             element_type => 'BudgetSummaryReportColumn'
411             },
412             ArrayOfCampaignPerformanceReportColumn => {
413             namespace_uri => 'https://adcenter.microsoft.com/v8',
414             element_name => 'CampaignPerformanceReportColumn',
415             element_type => 'CampaignPerformanceReportColumn'
416             },
417             ArrayOfCampaignReportScope => {
418             namespace_uri => 'https://adcenter.microsoft.com/v8',
419             element_name => 'CampaignReportScope',
420             element_type => 'CampaignReportScope'
421             },
422             ArrayOfConversionPerformanceReportColumn => {
423             namespace_uri => 'https://adcenter.microsoft.com/v8',
424             element_name => 'ConversionPerformanceReportColumn',
425             element_type => 'ConversionPerformanceReportColumn'
426             },
427             ArrayOfDestinationUrlPerformanceReportColumn => {
428             namespace_uri => 'https://adcenter.microsoft.com/v8',
429             element_name => 'DestinationUrlPerformanceReportColumn',
430             element_type => 'DestinationUrlPerformanceReportColumn'
431             },
432             ArrayOfGoalsAndFunnelsReportColumn => {
433             namespace_uri => 'https://adcenter.microsoft.com/v8',
434             element_name => 'GoalsAndFunnelsReportColumn',
435             element_type => 'GoalsAndFunnelsReportColumn'
436             },
437             ArrayOfKeywordMigrationReportColumn => {
438             namespace_uri => 'https://adcenter.microsoft.com/v8',
439             element_name => 'KeywordMigrationReportColumn',
440             element_type => 'KeywordMigrationReportColumn'
441             },
442             ArrayOfKeywordPerformanceReportColumn => {
443             namespace_uri => 'https://adcenter.microsoft.com/v8',
444             element_name => 'KeywordPerformanceReportColumn',
445             element_type => 'KeywordPerformanceReportColumn'
446             },
447             ArrayOfMetroAreaDemographicReportColumn => {
448             namespace_uri => 'https://adcenter.microsoft.com/v8',
449             element_name => 'MetroAreaDemographicReportColumn',
450             element_type => 'MetroAreaDemographicReportColumn'
451             },
452             ArrayOfNegativeKeywordConflictReportColumn => {
453             namespace_uri => 'https://adcenter.microsoft.com/v8',
454             element_name => 'NegativeKeywordConflictReportColumn',
455             element_type => 'NegativeKeywordConflictReportColumn'
456             },
457             ArrayOfOperationError => {
458             namespace_uri => 'https://adcenter.microsoft.com/v8',
459             element_name => 'OperationError',
460             element_type => 'OperationError'
461             },
462             ArrayOfPublisherUsagePerformanceReportColumn => {
463             namespace_uri => 'https://adcenter.microsoft.com/v8',
464             element_name => 'PublisherUsagePerformanceReportColumn',
465             element_type => 'PublisherUsagePerformanceReportColumn'
466             },
467             ArrayOfRichAdComponentPerformanceReportColumn => {
468             namespace_uri => 'https://adcenter.microsoft.com/v8',
469             element_name => 'RichAdComponentPerformanceReportColumn',
470             element_type => 'RichAdComponentPerformanceReportColumn'
471             },
472             ArrayOfSearchCampaignChangeHistoryReportColumn => {
473             namespace_uri => 'https://adcenter.microsoft.com/v8',
474             element_name => 'SearchCampaignChangeHistoryReportColumn',
475             element_type => 'SearchCampaignChangeHistoryReportColumn'
476             },
477             ArrayOfSearchQueryPerformanceReportColumn => {
478             namespace_uri => 'https://adcenter.microsoft.com/v8',
479             element_name => 'SearchQueryPerformanceReportColumn',
480             element_type => 'SearchQueryPerformanceReportColumn'
481             },
482             ArrayOfSegmentationReportColumn => {
483             namespace_uri => 'https://adcenter.microsoft.com/v8',
484             element_name => 'SegmentationReportColumn',
485             element_type => 'SegmentationReportColumn'
486             },
487             ArrayOfShareOfVoiceReportColumn => {
488             namespace_uri => 'https://adcenter.microsoft.com/v8',
489             element_name => 'ShareOfVoiceReportColumn',
490             element_type => 'ShareOfVoiceReportColumn'
491             },
492             ArrayOfSitePerformanceReportColumn => {
493             namespace_uri => 'https://adcenter.microsoft.com/v8',
494             element_name => 'SitePerformanceReportColumn',
495             element_type => 'SitePerformanceReportColumn'
496             },
497             ArrayOfTacticChannelReportColumn => {
498             namespace_uri => 'https://adcenter.microsoft.com/v8',
499             element_name => 'TacticChannelReportColumn',
500             element_type => 'TacticChannelReportColumn'
501             },
502             ArrayOfTrafficSourcesReportColumn => {
503             namespace_uri => 'https://adcenter.microsoft.com/v8',
504             element_name => 'TrafficSourcesReportColumn',
505             element_type => 'TrafficSourcesReportColumn'
506             },
507             ArrayOfint => {
508             namespace_uri => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays',
509             element_name => 'int',
510             element_type => 'int'
511             },
512             ArrayOflong => {
513             namespace_uri => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays',
514             element_name => 'long',
515             element_type => 'long'
516             },
517             ArrayOfstring => {
518             namespace_uri => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays',
519             element_name => 'string',
520             element_type => 'string'
521             },
522             );
523              
524             sub _array_types {
525             return %_array_types;
526             }
527              
528             __PACKAGE__->mk_accessors(qw/
529             ApplicationToken
530             CustomerAccountId
531             CustomerId
532             DeveloperToken
533             Password
534             UserName
535             TrackingId
536             /);
537              
538             1;