OLD | NEW |
1 library googleapis.adexchangebuyer.v1_3; | 1 library googleapis.adexchangebuyer.v1_3; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
11 import '../common/common.dart' as common; | 11 import '../common/common.dart' as common; |
12 | 12 |
13 export '../common/common.dart' show ApiRequestError; | 13 export '../common/common.dart' show ApiRequestError; |
14 export '../common/common.dart' show DetailedApiRequestError; | 14 export '../common/common.dart' show DetailedApiRequestError; |
15 | 15 |
16 /** | 16 /** |
17 * Accesses your bidding-account information, submits creatives for validation, | 17 * Accesses your bidding-account information, submits creatives for validation, |
18 * finds available direct deals, and retrieves performance reports. | 18 * finds available direct deals, and retrieves performance reports. |
19 */ | 19 */ |
20 class AdexchangebuyerApi { | 20 class AdexchangebuyerApi { |
21 /** Manage your Ad Exchange buyer account configuration */ | 21 /** Manage your Ad Exchange buyer account configuration */ |
22 static const AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchang
e.buyer"; | 22 static const AdexchangeBuyerScope = "https://www.googleapis.com/auth/adexchang
e.buyer"; |
23 | 23 |
24 | 24 |
25 final common_internal.ApiRequester _requester; | 25 final common_internal.ApiRequester _requester; |
26 | 26 |
27 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); | 27 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
28 BillingInfoResourceApi get billingInfo => new BillingInfoResourceApi(_requeste
r); | 28 BillingInfoResourceApi get billingInfo => new BillingInfoResourceApi(_requeste
r); |
| 29 BudgetResourceApi get budget => new BudgetResourceApi(_requester); |
29 CreativesResourceApi get creatives => new CreativesResourceApi(_requester); | 30 CreativesResourceApi get creatives => new CreativesResourceApi(_requester); |
30 DirectDealsResourceApi get directDeals => new DirectDealsResourceApi(_requeste
r); | 31 DirectDealsResourceApi get directDeals => new DirectDealsResourceApi(_requeste
r); |
31 PerformanceReportResourceApi get performanceReport => new PerformanceReportRes
ourceApi(_requester); | 32 PerformanceReportResourceApi get performanceReport => new PerformanceReportRes
ourceApi(_requester); |
32 PretargetingConfigResourceApi get pretargetingConfig => new PretargetingConfig
ResourceApi(_requester); | 33 PretargetingConfigResourceApi get pretargetingConfig => new PretargetingConfig
ResourceApi(_requester); |
33 | 34 |
34 AdexchangebuyerApi(http.Client client) : | 35 AdexchangebuyerApi(http.Client client, {core.String rootUrl: "https://www.goog
leapis.com/", core.String servicePath: "adexchangebuyer/v1.3/"}) : |
35 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "adexchangebuyer/v1.3/"); | 36 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); |
36 } | 37 } |
37 | 38 |
38 | 39 |
39 /** Not documented yet. */ | 40 /** Not documented yet. */ |
40 class AccountsResourceApi { | 41 class AccountsResourceApi { |
41 final common_internal.ApiRequester _requester; | 42 final common_internal.ApiRequester _requester; |
42 | 43 |
43 AccountsResourceApi(common_internal.ApiRequester client) : | 44 AccountsResourceApi(common_internal.ApiRequester client) : |
44 _requester = client; | 45 _requester = client; |
45 | 46 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 uploadOptions: _uploadOptions, | 292 uploadOptions: _uploadOptions, |
292 uploadMedia: _uploadMedia, | 293 uploadMedia: _uploadMedia, |
293 downloadOptions: _downloadOptions); | 294 downloadOptions: _downloadOptions); |
294 return _response.then((data) => new BillingInfoList.fromJson(data)); | 295 return _response.then((data) => new BillingInfoList.fromJson(data)); |
295 } | 296 } |
296 | 297 |
297 } | 298 } |
298 | 299 |
299 | 300 |
300 /** Not documented yet. */ | 301 /** Not documented yet. */ |
| 302 class BudgetResourceApi { |
| 303 final common_internal.ApiRequester _requester; |
| 304 |
| 305 BudgetResourceApi(common_internal.ApiRequester client) : |
| 306 _requester = client; |
| 307 |
| 308 /** |
| 309 * Returns the budget information for the adgroup specified by the accountId |
| 310 * and billingId. |
| 311 * |
| 312 * Request parameters: |
| 313 * |
| 314 * [accountId] - The account id to get the budget information for. |
| 315 * |
| 316 * [billingId] - The billing id to get the budget information for. |
| 317 * |
| 318 * Completes with a [Budget]. |
| 319 * |
| 320 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 321 * error. |
| 322 * |
| 323 * If the used [http.Client] completes with an error when making a REST call, |
| 324 * this method will complete with the same error. |
| 325 */ |
| 326 async.Future<Budget> get(core.String accountId, core.String billingId) { |
| 327 var _url = null; |
| 328 var _queryParams = new core.Map(); |
| 329 var _uploadMedia = null; |
| 330 var _uploadOptions = null; |
| 331 var _downloadOptions = common.DownloadOptions.Metadata; |
| 332 var _body = null; |
| 333 |
| 334 if (accountId == null) { |
| 335 throw new core.ArgumentError("Parameter accountId is required."); |
| 336 } |
| 337 if (billingId == null) { |
| 338 throw new core.ArgumentError("Parameter billingId is required."); |
| 339 } |
| 340 |
| 341 |
| 342 _url = 'billinginfo/' + common_internal.Escaper.ecapeVariable('$accountId')
+ '/' + common_internal.Escaper.ecapeVariable('$billingId'); |
| 343 |
| 344 var _response = _requester.request(_url, |
| 345 "GET", |
| 346 body: _body, |
| 347 queryParams: _queryParams, |
| 348 uploadOptions: _uploadOptions, |
| 349 uploadMedia: _uploadMedia, |
| 350 downloadOptions: _downloadOptions); |
| 351 return _response.then((data) => new Budget.fromJson(data)); |
| 352 } |
| 353 |
| 354 /** |
| 355 * Updates the budget amount for the budget of the adgroup specified by the |
| 356 * accountId and billingId, with the budget amount in the request. This method |
| 357 * supports patch semantics. |
| 358 * |
| 359 * [request] - The metadata request object. |
| 360 * |
| 361 * Request parameters: |
| 362 * |
| 363 * [accountId] - The account id associated with the budget being updated. |
| 364 * |
| 365 * [billingId] - The billing id associated with the budget being updated. |
| 366 * |
| 367 * Completes with a [Budget]. |
| 368 * |
| 369 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 370 * error. |
| 371 * |
| 372 * If the used [http.Client] completes with an error when making a REST call, |
| 373 * this method will complete with the same error. |
| 374 */ |
| 375 async.Future<Budget> patch(Budget request, core.String accountId, core.String
billingId) { |
| 376 var _url = null; |
| 377 var _queryParams = new core.Map(); |
| 378 var _uploadMedia = null; |
| 379 var _uploadOptions = null; |
| 380 var _downloadOptions = common.DownloadOptions.Metadata; |
| 381 var _body = null; |
| 382 |
| 383 if (request != null) { |
| 384 _body = convert.JSON.encode((request).toJson()); |
| 385 } |
| 386 if (accountId == null) { |
| 387 throw new core.ArgumentError("Parameter accountId is required."); |
| 388 } |
| 389 if (billingId == null) { |
| 390 throw new core.ArgumentError("Parameter billingId is required."); |
| 391 } |
| 392 |
| 393 |
| 394 _url = 'billinginfo/' + common_internal.Escaper.ecapeVariable('$accountId')
+ '/' + common_internal.Escaper.ecapeVariable('$billingId'); |
| 395 |
| 396 var _response = _requester.request(_url, |
| 397 "PATCH", |
| 398 body: _body, |
| 399 queryParams: _queryParams, |
| 400 uploadOptions: _uploadOptions, |
| 401 uploadMedia: _uploadMedia, |
| 402 downloadOptions: _downloadOptions); |
| 403 return _response.then((data) => new Budget.fromJson(data)); |
| 404 } |
| 405 |
| 406 /** |
| 407 * Updates the budget amount for the budget of the adgroup specified by the |
| 408 * accountId and billingId, with the budget amount in the request. |
| 409 * |
| 410 * [request] - The metadata request object. |
| 411 * |
| 412 * Request parameters: |
| 413 * |
| 414 * [accountId] - The account id associated with the budget being updated. |
| 415 * |
| 416 * [billingId] - The billing id associated with the budget being updated. |
| 417 * |
| 418 * Completes with a [Budget]. |
| 419 * |
| 420 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 421 * error. |
| 422 * |
| 423 * If the used [http.Client] completes with an error when making a REST call, |
| 424 * this method will complete with the same error. |
| 425 */ |
| 426 async.Future<Budget> update(Budget request, core.String accountId, core.String
billingId) { |
| 427 var _url = null; |
| 428 var _queryParams = new core.Map(); |
| 429 var _uploadMedia = null; |
| 430 var _uploadOptions = null; |
| 431 var _downloadOptions = common.DownloadOptions.Metadata; |
| 432 var _body = null; |
| 433 |
| 434 if (request != null) { |
| 435 _body = convert.JSON.encode((request).toJson()); |
| 436 } |
| 437 if (accountId == null) { |
| 438 throw new core.ArgumentError("Parameter accountId is required."); |
| 439 } |
| 440 if (billingId == null) { |
| 441 throw new core.ArgumentError("Parameter billingId is required."); |
| 442 } |
| 443 |
| 444 |
| 445 _url = 'billinginfo/' + common_internal.Escaper.ecapeVariable('$accountId')
+ '/' + common_internal.Escaper.ecapeVariable('$billingId'); |
| 446 |
| 447 var _response = _requester.request(_url, |
| 448 "PUT", |
| 449 body: _body, |
| 450 queryParams: _queryParams, |
| 451 uploadOptions: _uploadOptions, |
| 452 uploadMedia: _uploadMedia, |
| 453 downloadOptions: _downloadOptions); |
| 454 return _response.then((data) => new Budget.fromJson(data)); |
| 455 } |
| 456 |
| 457 } |
| 458 |
| 459 |
| 460 /** Not documented yet. */ |
301 class CreativesResourceApi { | 461 class CreativesResourceApi { |
302 final common_internal.ApiRequester _requester; | 462 final common_internal.ApiRequester _requester; |
303 | 463 |
304 CreativesResourceApi(common_internal.ApiRequester client) : | 464 CreativesResourceApi(common_internal.ApiRequester client) : |
305 _requester = client; | 465 _requester = client; |
306 | 466 |
307 /** | 467 /** |
308 * Gets the status for a single creative. A creative will be available 30-40 | 468 * Gets the status for a single creative. A creative will be available 30-40 |
309 * minutes after submission. | 469 * minutes after submission. |
310 * | 470 * |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 _json["items"] = items.map((value) => (value).toJson()).toList(); | 1345 _json["items"] = items.map((value) => (value).toJson()).toList(); |
1186 } | 1346 } |
1187 if (kind != null) { | 1347 if (kind != null) { |
1188 _json["kind"] = kind; | 1348 _json["kind"] = kind; |
1189 } | 1349 } |
1190 return _json; | 1350 return _json; |
1191 } | 1351 } |
1192 } | 1352 } |
1193 | 1353 |
1194 | 1354 |
| 1355 /** The configuration data for Ad Exchange RTB - Budget API. */ |
| 1356 class Budget { |
| 1357 /** The id of the account. This is required for get and update requests. */ |
| 1358 core.String accountId; |
| 1359 |
| 1360 /** |
| 1361 * The billing id to determine which adgroup to provide budget information |
| 1362 * for. This is required for get and update requests. |
| 1363 */ |
| 1364 core.String billingId; |
| 1365 |
| 1366 /** |
| 1367 * The budget amount to apply for the billingId provided. This is required for |
| 1368 * update requests. |
| 1369 */ |
| 1370 core.String budgetAmount; |
| 1371 |
| 1372 /** The currency code for the buyer. This cannot be altered here. */ |
| 1373 core.String currencyCode; |
| 1374 |
| 1375 /** The unique id that describes this item. */ |
| 1376 core.String id; |
| 1377 |
| 1378 /** The kind of the resource, i.e. "adexchangebuyer#budget". */ |
| 1379 core.String kind; |
| 1380 |
| 1381 |
| 1382 Budget(); |
| 1383 |
| 1384 Budget.fromJson(core.Map _json) { |
| 1385 if (_json.containsKey("accountId")) { |
| 1386 accountId = _json["accountId"]; |
| 1387 } |
| 1388 if (_json.containsKey("billingId")) { |
| 1389 billingId = _json["billingId"]; |
| 1390 } |
| 1391 if (_json.containsKey("budgetAmount")) { |
| 1392 budgetAmount = _json["budgetAmount"]; |
| 1393 } |
| 1394 if (_json.containsKey("currencyCode")) { |
| 1395 currencyCode = _json["currencyCode"]; |
| 1396 } |
| 1397 if (_json.containsKey("id")) { |
| 1398 id = _json["id"]; |
| 1399 } |
| 1400 if (_json.containsKey("kind")) { |
| 1401 kind = _json["kind"]; |
| 1402 } |
| 1403 } |
| 1404 |
| 1405 core.Map toJson() { |
| 1406 var _json = new core.Map(); |
| 1407 if (accountId != null) { |
| 1408 _json["accountId"] = accountId; |
| 1409 } |
| 1410 if (billingId != null) { |
| 1411 _json["billingId"] = billingId; |
| 1412 } |
| 1413 if (budgetAmount != null) { |
| 1414 _json["budgetAmount"] = budgetAmount; |
| 1415 } |
| 1416 if (currencyCode != null) { |
| 1417 _json["currencyCode"] = currencyCode; |
| 1418 } |
| 1419 if (id != null) { |
| 1420 _json["id"] = id; |
| 1421 } |
| 1422 if (kind != null) { |
| 1423 _json["kind"] = kind; |
| 1424 } |
| 1425 return _json; |
| 1426 } |
| 1427 } |
| 1428 |
| 1429 |
1195 /** Not documented yet. */ | 1430 /** Not documented yet. */ |
1196 class CreativeCorrections { | 1431 class CreativeCorrections { |
1197 /** Additional details about the correction. */ | 1432 /** Additional details about the correction. */ |
1198 core.List<core.String> details; | 1433 core.List<core.String> details; |
1199 | 1434 |
1200 /** The type of correction that was applied to the creative. */ | 1435 /** The type of correction that was applied to the creative. */ |
1201 core.String reason; | 1436 core.String reason; |
1202 | 1437 |
1203 | 1438 |
1204 CreativeCorrections(); | 1439 CreativeCorrections(); |
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2414 _json["items"] = items.map((value) => (value).toJson()).toList(); | 2649 _json["items"] = items.map((value) => (value).toJson()).toList(); |
2415 } | 2650 } |
2416 if (kind != null) { | 2651 if (kind != null) { |
2417 _json["kind"] = kind; | 2652 _json["kind"] = kind; |
2418 } | 2653 } |
2419 return _json; | 2654 return _json; |
2420 } | 2655 } |
2421 } | 2656 } |
2422 | 2657 |
2423 | 2658 |
OLD | NEW |