line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Microsoft::AdCenter::V8::NotificationService; |
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
|
19
|
|
|
19
|
|
11383265
|
use strict; |
|
19
|
|
|
|
|
54
|
|
|
19
|
|
|
|
|
1337
|
|
7
|
19
|
|
|
19
|
|
171
|
use warnings; |
|
19
|
|
|
|
|
42
|
|
|
19
|
|
|
|
|
839
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Microsoft::AdCenter::V8::NotificationService - Service client for Microsoft AdCenter Notification Service. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Microsoft::AdCenter::V8::NotificationService; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $service_client = Microsoft::AdCenter::V8::NotificationService->new |
18
|
|
|
|
|
|
|
->ApplicationToken("application token") |
19
|
|
|
|
|
|
|
->DeveloperToken("developer token") |
20
|
|
|
|
|
|
|
->Password("password") |
21
|
|
|
|
|
|
|
->UserName("user name"); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $response = $service_client->GetArchivedNotifications( |
24
|
|
|
|
|
|
|
NotificationTypes => ... |
25
|
|
|
|
|
|
|
TopN => ... |
26
|
|
|
|
|
|
|
StartDate => ... |
27
|
|
|
|
|
|
|
EndDate => ... |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
See L for detailed documentation for this service. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 METHODS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 EndPoint |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Changes the end point for this service client. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Default value: https://sharedservices.adcenterapi.microsoft.com/Api/Notification/v8/NotificationService.svc |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 ApplicationToken |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Gets/sets ApplicationToken (string) in the request header |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 DeveloperToken |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Gets/sets DeveloperToken (string) in the request header |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 Password |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Gets/sets Password (string) in the request header |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 UserName |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Gets/sets UserName (string) in the request header |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 TrackingId |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Gets TrackingId (string) in the response header |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
19
|
|
|
19
|
|
115
|
use base qw/Microsoft::AdCenter::Service/; |
|
19
|
|
|
|
|
42
|
|
|
19
|
|
|
|
|
20715
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub _service_name { |
65
|
|
|
|
|
|
|
return 'NotificationService'; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub _service_version { |
69
|
|
|
|
|
|
|
return 'V8'; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub _class_name { |
73
|
|
|
|
|
|
|
return 'NotificationService'; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub _namespace_uri { |
77
|
|
|
|
|
|
|
return 'https://adcenter.microsoft.com/api/notifications'; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub _default_location { |
81
|
|
|
|
|
|
|
return 'https://sharedservices.adcenterapi.microsoft.com/Api/Notification/v8/NotificationService.svc'; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub _wsdl { |
85
|
|
|
|
|
|
|
return 'https://sharedservices.adcenterapi.microsoft.com/Api/Notification/v8/NotificationService.svc?wsdl'; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
our $_request_headers = [ |
89
|
|
|
|
|
|
|
{ name => 'ApplicationToken', type => 'string', namespace => 'https://adcenter.microsoft.com/api/notifications' }, |
90
|
|
|
|
|
|
|
{ name => 'DeveloperToken', type => 'string', namespace => 'https://adcenter.microsoft.com/api/notifications' }, |
91
|
|
|
|
|
|
|
{ name => 'Password', type => 'string', namespace => 'https://adcenter.microsoft.com/api/notifications' }, |
92
|
|
|
|
|
|
|
{ name => 'UserName', type => 'string', namespace => 'https://adcenter.microsoft.com/api/notifications' } |
93
|
|
|
|
|
|
|
]; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
our $_request_headers_expanded = { |
96
|
|
|
|
|
|
|
ApplicationToken => 'string', |
97
|
|
|
|
|
|
|
DeveloperToken => 'string', |
98
|
|
|
|
|
|
|
Password => 'string', |
99
|
|
|
|
|
|
|
UserName => 'string' |
100
|
|
|
|
|
|
|
}; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub _request_headers { |
103
|
|
|
|
|
|
|
return $_request_headers; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub _request_headers_expanded { |
107
|
|
|
|
|
|
|
return $_request_headers_expanded; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
our $_response_headers = [ |
111
|
|
|
|
|
|
|
{ name => 'TrackingId', type => 'string', namespace => 'https://adcenter.microsoft.com/api/notifications' } |
112
|
|
|
|
|
|
|
]; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
our $_response_headers_expanded = { |
115
|
|
|
|
|
|
|
TrackingId => 'string' |
116
|
|
|
|
|
|
|
}; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub _response_headers { |
119
|
|
|
|
|
|
|
return $_response_headers; |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
sub _response_headers_expanded { |
123
|
|
|
|
|
|
|
return $_response_headers_expanded; |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 GetArchivedNotifications |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=over |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=item Parameters: |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
NotificationTypes (NotificationType) |
133
|
|
|
|
|
|
|
TopN (int) |
134
|
|
|
|
|
|
|
StartDate (dateTime) |
135
|
|
|
|
|
|
|
EndDate (dateTime) |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=item Returns: |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
GetArchivedNotificationsResponse |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=back |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
sub GetArchivedNotifications { |
146
|
|
|
|
|
|
|
my ($self, %args) = @_; |
147
|
|
|
|
|
|
|
return $self->_invoke( |
148
|
|
|
|
|
|
|
soap_action => 'GetArchivedNotifications', |
149
|
|
|
|
|
|
|
request => { |
150
|
|
|
|
|
|
|
name => 'GetArchivedNotificationsRequest', |
151
|
|
|
|
|
|
|
parameters => [ |
152
|
|
|
|
|
|
|
{ name => 'NotificationTypes', type => 'NotificationType', namespace => 'https://adcenter.microsoft.com/api/notifications' }, |
153
|
|
|
|
|
|
|
{ name => 'TopN', type => 'int', namespace => 'https://adcenter.microsoft.com/api/notifications' }, |
154
|
|
|
|
|
|
|
{ name => 'StartDate', type => 'dateTime', namespace => 'https://adcenter.microsoft.com/api/notifications' }, |
155
|
|
|
|
|
|
|
{ name => 'EndDate', type => 'dateTime', namespace => 'https://adcenter.microsoft.com/api/notifications' } |
156
|
|
|
|
|
|
|
] |
157
|
|
|
|
|
|
|
}, |
158
|
|
|
|
|
|
|
response => { |
159
|
|
|
|
|
|
|
name => 'GetArchivedNotificationsResponse' |
160
|
|
|
|
|
|
|
}, |
161
|
|
|
|
|
|
|
parameters => \%args |
162
|
|
|
|
|
|
|
); |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 GetNotifications |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=over |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=item Parameters: |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
NotificationTypes (NotificationType) |
172
|
|
|
|
|
|
|
TopN (int) |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=item Returns: |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
GetNotificationsResponse |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=back |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=cut |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
sub GetNotifications { |
183
|
|
|
|
|
|
|
my ($self, %args) = @_; |
184
|
|
|
|
|
|
|
return $self->_invoke( |
185
|
|
|
|
|
|
|
soap_action => 'GetNotifications', |
186
|
|
|
|
|
|
|
request => { |
187
|
|
|
|
|
|
|
name => 'GetNotificationsRequest', |
188
|
|
|
|
|
|
|
parameters => [ |
189
|
|
|
|
|
|
|
{ name => 'NotificationTypes', type => 'NotificationType', namespace => 'https://adcenter.microsoft.com/api/notifications' }, |
190
|
|
|
|
|
|
|
{ name => 'TopN', type => 'int', namespace => 'https://adcenter.microsoft.com/api/notifications' } |
191
|
|
|
|
|
|
|
] |
192
|
|
|
|
|
|
|
}, |
193
|
|
|
|
|
|
|
response => { |
194
|
|
|
|
|
|
|
name => 'GetNotificationsResponse' |
195
|
|
|
|
|
|
|
}, |
196
|
|
|
|
|
|
|
parameters => \%args |
197
|
|
|
|
|
|
|
); |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
our %_simple_types = ( |
201
|
|
|
|
|
|
|
NotificationType => 'https://adcenter.microsoft.com/api/notifications/Entities', |
202
|
|
|
|
|
|
|
char => 'http://schemas.microsoft.com/2003/10/Serialization/', |
203
|
|
|
|
|
|
|
duration => 'http://schemas.microsoft.com/2003/10/Serialization/', |
204
|
|
|
|
|
|
|
guid => 'http://schemas.microsoft.com/2003/10/Serialization/', |
205
|
|
|
|
|
|
|
); |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
sub _simple_types { |
208
|
|
|
|
|
|
|
return %_simple_types; |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
our @_complex_types = (qw/ |
212
|
|
|
|
|
|
|
AccountNotification |
213
|
|
|
|
|
|
|
AdApiError |
214
|
|
|
|
|
|
|
AdApiFaultDetail |
215
|
|
|
|
|
|
|
ApiFault |
216
|
|
|
|
|
|
|
ApplicationFault |
217
|
|
|
|
|
|
|
BudgetDepletedCampaignInfo |
218
|
|
|
|
|
|
|
BudgetDepletedNotification |
219
|
|
|
|
|
|
|
CampaignInfo |
220
|
|
|
|
|
|
|
CreditCardPendingExpirationNotification |
221
|
|
|
|
|
|
|
EditorialRejectionNotification |
222
|
|
|
|
|
|
|
ExpiredCreditCardNotification |
223
|
|
|
|
|
|
|
ExpiredInsertionOrderNotification |
224
|
|
|
|
|
|
|
GetArchivedNotificationsResponse |
225
|
|
|
|
|
|
|
GetNotificationsResponse |
226
|
|
|
|
|
|
|
LowBudgetBalanceCampaignInfo |
227
|
|
|
|
|
|
|
LowBudgetBalanceNotification |
228
|
|
|
|
|
|
|
Notification |
229
|
|
|
|
|
|
|
OperationError |
230
|
|
|
|
|
|
|
/); |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
sub _complex_types { |
233
|
|
|
|
|
|
|
return @_complex_types; |
234
|
|
|
|
|
|
|
} |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
our %_array_types = ( |
237
|
|
|
|
|
|
|
ArrayOfAdApiError => { |
238
|
|
|
|
|
|
|
namespace_uri => 'https://adapi.microsoft.com', |
239
|
|
|
|
|
|
|
element_name => 'AdApiError', |
240
|
|
|
|
|
|
|
element_type => 'AdApiError' |
241
|
|
|
|
|
|
|
}, |
242
|
|
|
|
|
|
|
ArrayOfBudgetDepletedCampaignInfo => { |
243
|
|
|
|
|
|
|
namespace_uri => 'https://adcenter.microsoft.com/api/notifications/Entities', |
244
|
|
|
|
|
|
|
element_name => 'BudgetDepletedCampaignInfo', |
245
|
|
|
|
|
|
|
element_type => 'BudgetDepletedCampaignInfo' |
246
|
|
|
|
|
|
|
}, |
247
|
|
|
|
|
|
|
ArrayOfLowBudgetBalanceCampaignInfo => { |
248
|
|
|
|
|
|
|
namespace_uri => 'https://adcenter.microsoft.com/api/notifications/Entities', |
249
|
|
|
|
|
|
|
element_name => 'LowBudgetBalanceCampaignInfo', |
250
|
|
|
|
|
|
|
element_type => 'LowBudgetBalanceCampaignInfo' |
251
|
|
|
|
|
|
|
}, |
252
|
|
|
|
|
|
|
ArrayOfNotification => { |
253
|
|
|
|
|
|
|
namespace_uri => 'https://adcenter.microsoft.com/api/notifications/Entities', |
254
|
|
|
|
|
|
|
element_name => 'Notification', |
255
|
|
|
|
|
|
|
element_type => 'Notification' |
256
|
|
|
|
|
|
|
}, |
257
|
|
|
|
|
|
|
ArrayOfOperationError => { |
258
|
|
|
|
|
|
|
namespace_uri => 'https://adcenter.microsoft.com/api/customermanagement/Exception', |
259
|
|
|
|
|
|
|
element_name => 'OperationError', |
260
|
|
|
|
|
|
|
element_type => 'OperationError' |
261
|
|
|
|
|
|
|
}, |
262
|
|
|
|
|
|
|
); |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
sub _array_types { |
265
|
|
|
|
|
|
|
return %_array_types; |
266
|
|
|
|
|
|
|
} |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/ |
269
|
|
|
|
|
|
|
ApplicationToken |
270
|
|
|
|
|
|
|
DeveloperToken |
271
|
|
|
|
|
|
|
Password |
272
|
|
|
|
|
|
|
UserName |
273
|
|
|
|
|
|
|
TrackingId |
274
|
|
|
|
|
|
|
/); |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
1; |