line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Microsoft::AdCenter::V8::OptimizerService; |
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
|
14
|
|
|
14
|
|
1099510
|
use strict; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
584
|
|
7
|
14
|
|
|
14
|
|
109
|
use warnings; |
|
14
|
|
|
|
|
33
|
|
|
14
|
|
|
|
|
619
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Microsoft::AdCenter::V8::OptimizerService - Service client for Microsoft AdCenter Optimizer Service. |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Microsoft::AdCenter::V8::OptimizerService; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $service_client = Microsoft::AdCenter::V8::OptimizerService->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->ApplyBudgetOpportunities( |
26
|
|
|
|
|
|
|
AccountId => ... |
27
|
|
|
|
|
|
|
OpportunityKeys => ... |
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://adcenterapi.microsoft.com/Api/Advertiser/V8/Optimizer/OptimizerService.svc |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 ApplicationToken |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Gets/sets ApplicationToken (string) in the request header |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 CustomerAccountId |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Gets/sets CustomerAccountId (string) in the request header |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 CustomerId |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Gets/sets CustomerId (string) in the request header |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 DeveloperToken |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Gets/sets DeveloperToken (string) in the request header |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 Password |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Gets/sets Password (string) in the request header |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 UserName |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Gets/sets UserName (string) in the request header |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 TrackingId |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Gets TrackingId (string) in the response header |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
14
|
|
|
14
|
|
79
|
use base qw/Microsoft::AdCenter::Service/; |
|
14
|
|
|
|
|
60
|
|
|
14
|
|
|
|
|
15427
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub _service_name { |
73
|
|
|
|
|
|
|
return 'OptimizerService'; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub _service_version { |
77
|
|
|
|
|
|
|
return 'V8'; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub _class_name { |
81
|
|
|
|
|
|
|
return 'OptimizerService'; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub _namespace_uri { |
85
|
|
|
|
|
|
|
return 'https://adcenter.microsoft.com/v8'; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub _default_location { |
89
|
|
|
|
|
|
|
return 'https://adcenterapi.microsoft.com/Api/Advertiser/V8/Optimizer/OptimizerService.svc'; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub _wsdl { |
93
|
|
|
|
|
|
|
return 'https://adcenterapi.microsoft.com/Api/Advertiser/v8/Optimizer/OptimizerService.svc?wsdl'; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
our $_request_headers = [ |
97
|
|
|
|
|
|
|
{ name => 'ApplicationToken', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }, |
98
|
|
|
|
|
|
|
{ name => 'CustomerAccountId', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }, |
99
|
|
|
|
|
|
|
{ name => 'CustomerId', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }, |
100
|
|
|
|
|
|
|
{ name => 'DeveloperToken', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }, |
101
|
|
|
|
|
|
|
{ name => 'Password', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' }, |
102
|
|
|
|
|
|
|
{ name => 'UserName', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' } |
103
|
|
|
|
|
|
|
]; |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
our $_request_headers_expanded = { |
106
|
|
|
|
|
|
|
ApplicationToken => 'string', |
107
|
|
|
|
|
|
|
CustomerAccountId => 'string', |
108
|
|
|
|
|
|
|
CustomerId => 'string', |
109
|
|
|
|
|
|
|
DeveloperToken => 'string', |
110
|
|
|
|
|
|
|
Password => 'string', |
111
|
|
|
|
|
|
|
UserName => 'string' |
112
|
|
|
|
|
|
|
}; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub _request_headers { |
115
|
|
|
|
|
|
|
return $_request_headers; |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub _request_headers_expanded { |
119
|
|
|
|
|
|
|
return $_request_headers_expanded; |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
our $_response_headers = [ |
123
|
|
|
|
|
|
|
{ name => 'TrackingId', type => 'string', namespace => 'https://adcenter.microsoft.com/v8' } |
124
|
|
|
|
|
|
|
]; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
our $_response_headers_expanded = { |
127
|
|
|
|
|
|
|
TrackingId => 'string' |
128
|
|
|
|
|
|
|
}; |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub _response_headers { |
131
|
|
|
|
|
|
|
return $_response_headers; |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub _response_headers_expanded { |
135
|
|
|
|
|
|
|
return $_response_headers_expanded; |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head2 ApplyBudgetOpportunities |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=over |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=item Parameters: |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
AccountId (long) |
145
|
|
|
|
|
|
|
OpportunityKeys (ArrayOfstring) |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=item Returns: |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
ApplyBudgetOpportunitiesResponse |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=back |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=cut |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
sub ApplyBudgetOpportunities { |
156
|
|
|
|
|
|
|
my ($self, %args) = @_; |
157
|
|
|
|
|
|
|
return $self->_invoke( |
158
|
|
|
|
|
|
|
soap_action => 'ApplyBudgetOpportunities', |
159
|
|
|
|
|
|
|
request => { |
160
|
|
|
|
|
|
|
name => 'ApplyBudgetOpportunitiesRequest', |
161
|
|
|
|
|
|
|
parameters => [ |
162
|
|
|
|
|
|
|
{ name => 'AccountId', type => 'long', namespace => 'https://adcenter.microsoft.com/v8' }, |
163
|
|
|
|
|
|
|
{ name => 'OpportunityKeys', type => 'ArrayOfstring', namespace => 'https://adcenter.microsoft.com/v8' } |
164
|
|
|
|
|
|
|
] |
165
|
|
|
|
|
|
|
}, |
166
|
|
|
|
|
|
|
response => { |
167
|
|
|
|
|
|
|
name => 'ApplyBudgetOpportunitiesResponse' |
168
|
|
|
|
|
|
|
}, |
169
|
|
|
|
|
|
|
parameters => \%args |
170
|
|
|
|
|
|
|
); |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head2 ApplyOpportunities |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=over |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=item Parameters: |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
AccountId (long) |
180
|
|
|
|
|
|
|
OpportunityKeys (ArrayOfstring) |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=item Returns: |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
ApplyOpportunitiesResponse |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=back |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=cut |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
sub ApplyOpportunities { |
191
|
|
|
|
|
|
|
my ($self, %args) = @_; |
192
|
|
|
|
|
|
|
return $self->_invoke( |
193
|
|
|
|
|
|
|
soap_action => 'ApplyOpportunities', |
194
|
|
|
|
|
|
|
request => { |
195
|
|
|
|
|
|
|
name => 'ApplyOpportunitiesRequest', |
196
|
|
|
|
|
|
|
parameters => [ |
197
|
|
|
|
|
|
|
{ name => 'AccountId', type => 'long', namespace => 'https://adcenter.microsoft.com/v8' }, |
198
|
|
|
|
|
|
|
{ name => 'OpportunityKeys', type => 'ArrayOfstring', namespace => 'https://adcenter.microsoft.com/v8' } |
199
|
|
|
|
|
|
|
] |
200
|
|
|
|
|
|
|
}, |
201
|
|
|
|
|
|
|
response => { |
202
|
|
|
|
|
|
|
name => 'ApplyOpportunitiesResponse' |
203
|
|
|
|
|
|
|
}, |
204
|
|
|
|
|
|
|
parameters => \%args |
205
|
|
|
|
|
|
|
); |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=head2 GetBidOpportunities |
209
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=over |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=item Parameters: |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
AccountId (long) |
215
|
|
|
|
|
|
|
AdGroupId (long) |
216
|
|
|
|
|
|
|
CampaignId (long) |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=item Returns: |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
GetBidOpportunitiesResponse |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
=back |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=cut |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
sub GetBidOpportunities { |
227
|
|
|
|
|
|
|
my ($self, %args) = @_; |
228
|
|
|
|
|
|
|
return $self->_invoke( |
229
|
|
|
|
|
|
|
soap_action => 'GetBidOpportunities', |
230
|
|
|
|
|
|
|
request => { |
231
|
|
|
|
|
|
|
name => 'GetBidOpportunitiesRequest', |
232
|
|
|
|
|
|
|
parameters => [ |
233
|
|
|
|
|
|
|
{ name => 'AccountId', type => 'long', namespace => 'https://adcenter.microsoft.com/v8' }, |
234
|
|
|
|
|
|
|
{ name => 'AdGroupId', type => 'long', namespace => 'https://adcenter.microsoft.com/v8' }, |
235
|
|
|
|
|
|
|
{ name => 'CampaignId', type => 'long', namespace => 'https://adcenter.microsoft.com/v8' } |
236
|
|
|
|
|
|
|
] |
237
|
|
|
|
|
|
|
}, |
238
|
|
|
|
|
|
|
response => { |
239
|
|
|
|
|
|
|
name => 'GetBidOpportunitiesResponse' |
240
|
|
|
|
|
|
|
}, |
241
|
|
|
|
|
|
|
parameters => \%args |
242
|
|
|
|
|
|
|
); |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=head2 GetBudgetOpportunities |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=over |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=item Parameters: |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
AccountId (long) |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=item Returns: |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
GetBudgetOpportunitiesResponse |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
=back |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
=cut |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub GetBudgetOpportunities { |
262
|
|
|
|
|
|
|
my ($self, %args) = @_; |
263
|
|
|
|
|
|
|
return $self->_invoke( |
264
|
|
|
|
|
|
|
soap_action => 'GetBudgetOpportunities', |
265
|
|
|
|
|
|
|
request => { |
266
|
|
|
|
|
|
|
name => 'GetBudgetOpportunitiesRequest', |
267
|
|
|
|
|
|
|
parameters => [ |
268
|
|
|
|
|
|
|
{ name => 'AccountId', type => 'long', namespace => 'https://adcenter.microsoft.com/v8' } |
269
|
|
|
|
|
|
|
] |
270
|
|
|
|
|
|
|
}, |
271
|
|
|
|
|
|
|
response => { |
272
|
|
|
|
|
|
|
name => 'GetBudgetOpportunitiesResponse' |
273
|
|
|
|
|
|
|
}, |
274
|
|
|
|
|
|
|
parameters => \%args |
275
|
|
|
|
|
|
|
); |
276
|
|
|
|
|
|
|
} |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
our %_simple_types = ( |
279
|
|
|
|
|
|
|
BudgetLimitType => 'http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.Optimizer.Api.DataContracts', |
280
|
|
|
|
|
|
|
ErrorCodes => 'http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Shared.Api', |
281
|
|
|
|
|
|
|
char => 'http://schemas.microsoft.com/2003/10/Serialization/', |
282
|
|
|
|
|
|
|
duration => 'http://schemas.microsoft.com/2003/10/Serialization/', |
283
|
|
|
|
|
|
|
guid => 'http://schemas.microsoft.com/2003/10/Serialization/', |
284
|
|
|
|
|
|
|
); |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
sub _simple_types { |
287
|
|
|
|
|
|
|
return %_simple_types; |
288
|
|
|
|
|
|
|
} |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
our @_complex_types = (qw/ |
291
|
|
|
|
|
|
|
AdApiError |
292
|
|
|
|
|
|
|
AdApiFaultDetail |
293
|
|
|
|
|
|
|
ApiFaultDetail |
294
|
|
|
|
|
|
|
ApplicationFault |
295
|
|
|
|
|
|
|
ApplyBudgetOpportunitiesResponse |
296
|
|
|
|
|
|
|
ApplyOpportunitiesResponse |
297
|
|
|
|
|
|
|
BatchError |
298
|
|
|
|
|
|
|
BidOpportunity |
299
|
|
|
|
|
|
|
BudgetOpportunity |
300
|
|
|
|
|
|
|
GetBidOpportunitiesResponse |
301
|
|
|
|
|
|
|
GetBudgetOpportunitiesResponse |
302
|
|
|
|
|
|
|
OperationError |
303
|
|
|
|
|
|
|
Opportunity |
304
|
|
|
|
|
|
|
/); |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
sub _complex_types { |
307
|
|
|
|
|
|
|
return @_complex_types; |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
our %_array_types = ( |
311
|
|
|
|
|
|
|
ArrayOfAdApiError => { |
312
|
|
|
|
|
|
|
namespace_uri => 'https://adapi.microsoft.com', |
313
|
|
|
|
|
|
|
element_name => 'AdApiError', |
314
|
|
|
|
|
|
|
element_type => 'AdApiError' |
315
|
|
|
|
|
|
|
}, |
316
|
|
|
|
|
|
|
ArrayOfBatchError => { |
317
|
|
|
|
|
|
|
namespace_uri => 'https://adcenter.microsoft.com/v8', |
318
|
|
|
|
|
|
|
element_name => 'BatchError', |
319
|
|
|
|
|
|
|
element_type => 'BatchError' |
320
|
|
|
|
|
|
|
}, |
321
|
|
|
|
|
|
|
ArrayOfBidOpportunity => { |
322
|
|
|
|
|
|
|
namespace_uri => 'http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.Optimizer.Api.DataContracts.Entities', |
323
|
|
|
|
|
|
|
element_name => 'BidOpportunity', |
324
|
|
|
|
|
|
|
element_type => 'BidOpportunity' |
325
|
|
|
|
|
|
|
}, |
326
|
|
|
|
|
|
|
ArrayOfBudgetOpportunity => { |
327
|
|
|
|
|
|
|
namespace_uri => 'http://schemas.datacontract.org/2004/07/Microsoft.AdCenter.Advertiser.Optimizer.Api.DataContracts.Entities', |
328
|
|
|
|
|
|
|
element_name => 'BudgetOpportunity', |
329
|
|
|
|
|
|
|
element_type => 'BudgetOpportunity' |
330
|
|
|
|
|
|
|
}, |
331
|
|
|
|
|
|
|
ArrayOfOperationError => { |
332
|
|
|
|
|
|
|
namespace_uri => 'https://adcenter.microsoft.com/v8', |
333
|
|
|
|
|
|
|
element_name => 'OperationError', |
334
|
|
|
|
|
|
|
element_type => 'OperationError' |
335
|
|
|
|
|
|
|
}, |
336
|
|
|
|
|
|
|
ArrayOfstring => { |
337
|
|
|
|
|
|
|
namespace_uri => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays', |
338
|
|
|
|
|
|
|
element_name => 'string', |
339
|
|
|
|
|
|
|
element_type => 'string' |
340
|
|
|
|
|
|
|
}, |
341
|
|
|
|
|
|
|
); |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
sub _array_types { |
344
|
|
|
|
|
|
|
return %_array_types; |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/ |
348
|
|
|
|
|
|
|
ApplicationToken |
349
|
|
|
|
|
|
|
CustomerAccountId |
350
|
|
|
|
|
|
|
CustomerId |
351
|
|
|
|
|
|
|
DeveloperToken |
352
|
|
|
|
|
|
|
Password |
353
|
|
|
|
|
|
|
UserName |
354
|
|
|
|
|
|
|
TrackingId |
355
|
|
|
|
|
|
|
/); |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
1; |