| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.content.v2; | 3 library googleapis.content.v2; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client content/v2'; | 15 const core.String USER_AGENT = 'dart-api-client content/v2'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Manages product items, inventory, and Merchant Center accounts for Google | 18 * Manages product items, inventory, and Merchant Center accounts for Google |
| 19 * Shopping. | 19 * Shopping. |
| 20 */ | 20 */ |
| 21 class ContentApi { | 21 class ContentApi { |
| 22 /** Manage your product listings and accounts for Google Shopping */ | 22 /** Manage your product listings and accounts for Google Shopping */ |
| 23 static const ContentScope = "https://www.googleapis.com/auth/content"; | 23 static const ContentScope = "https://www.googleapis.com/auth/content"; |
| 24 | 24 |
| 25 | 25 |
| 26 final commons.ApiRequester _requester; | 26 final commons.ApiRequester _requester; |
| 27 | 27 |
| 28 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); | 28 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
| 29 AccountshippingResourceApi get accountshipping => new AccountshippingResourceA
pi(_requester); | |
| 30 AccountstatusesResourceApi get accountstatuses => new AccountstatusesResourceA
pi(_requester); | 29 AccountstatusesResourceApi get accountstatuses => new AccountstatusesResourceA
pi(_requester); |
| 31 AccounttaxResourceApi get accounttax => new AccounttaxResourceApi(_requester); | 30 AccounttaxResourceApi get accounttax => new AccounttaxResourceApi(_requester); |
| 32 DatafeedsResourceApi get datafeeds => new DatafeedsResourceApi(_requester); | 31 DatafeedsResourceApi get datafeeds => new DatafeedsResourceApi(_requester); |
| 33 DatafeedstatusesResourceApi get datafeedstatuses => new DatafeedstatusesResour
ceApi(_requester); | 32 DatafeedstatusesResourceApi get datafeedstatuses => new DatafeedstatusesResour
ceApi(_requester); |
| 34 InventoryResourceApi get inventory => new InventoryResourceApi(_requester); | 33 InventoryResourceApi get inventory => new InventoryResourceApi(_requester); |
| 35 OrdersResourceApi get orders => new OrdersResourceApi(_requester); | 34 OrdersResourceApi get orders => new OrdersResourceApi(_requester); |
| 36 ProductsResourceApi get products => new ProductsResourceApi(_requester); | 35 ProductsResourceApi get products => new ProductsResourceApi(_requester); |
| 37 ProductstatusesResourceApi get productstatuses => new ProductstatusesResourceA
pi(_requester); | 36 ProductstatusesResourceApi get productstatuses => new ProductstatusesResourceA
pi(_requester); |
| 38 ShippingsettingsResourceApi get shippingsettings => new ShippingsettingsResour
ceApi(_requester); | 37 ShippingsettingsResourceApi get shippingsettings => new ShippingsettingsResour
ceApi(_requester); |
| 39 | 38 |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 queryParams: _queryParams, | 434 queryParams: _queryParams, |
| 436 uploadOptions: _uploadOptions, | 435 uploadOptions: _uploadOptions, |
| 437 uploadMedia: _uploadMedia, | 436 uploadMedia: _uploadMedia, |
| 438 downloadOptions: _downloadOptions); | 437 downloadOptions: _downloadOptions); |
| 439 return _response.then((data) => new Account.fromJson(data)); | 438 return _response.then((data) => new Account.fromJson(data)); |
| 440 } | 439 } |
| 441 | 440 |
| 442 } | 441 } |
| 443 | 442 |
| 444 | 443 |
| 445 class AccountshippingResourceApi { | |
| 446 final commons.ApiRequester _requester; | |
| 447 | |
| 448 AccountshippingResourceApi(commons.ApiRequester client) : | |
| 449 _requester = client; | |
| 450 | |
| 451 /** | |
| 452 * Retrieves and updates the shipping settings of multiple accounts in a | |
| 453 * single request. | |
| 454 * | |
| 455 * [request] - The metadata request object. | |
| 456 * | |
| 457 * Request parameters: | |
| 458 * | |
| 459 * [dryRun] - Flag to run the request in dry-run mode. | |
| 460 * | |
| 461 * Completes with a [AccountshippingCustomBatchResponse]. | |
| 462 * | |
| 463 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 464 * error. | |
| 465 * | |
| 466 * If the used [http.Client] completes with an error when making a REST call, | |
| 467 * this method will complete with the same error. | |
| 468 */ | |
| 469 async.Future<AccountshippingCustomBatchResponse> custombatch(AccountshippingCu
stomBatchRequest request, {core.bool dryRun}) { | |
| 470 var _url = null; | |
| 471 var _queryParams = new core.Map(); | |
| 472 var _uploadMedia = null; | |
| 473 var _uploadOptions = null; | |
| 474 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 475 var _body = null; | |
| 476 | |
| 477 if (request != null) { | |
| 478 _body = convert.JSON.encode((request).toJson()); | |
| 479 } | |
| 480 if (dryRun != null) { | |
| 481 _queryParams["dryRun"] = ["${dryRun}"]; | |
| 482 } | |
| 483 | |
| 484 _url = 'accountshipping/batch'; | |
| 485 | |
| 486 var _response = _requester.request(_url, | |
| 487 "POST", | |
| 488 body: _body, | |
| 489 queryParams: _queryParams, | |
| 490 uploadOptions: _uploadOptions, | |
| 491 uploadMedia: _uploadMedia, | |
| 492 downloadOptions: _downloadOptions); | |
| 493 return _response.then((data) => new AccountshippingCustomBatchResponse.fromJ
son(data)); | |
| 494 } | |
| 495 | |
| 496 /** | |
| 497 * Retrieves the shipping settings of the account. This method can only be | |
| 498 * called for accounts to which the managing account has access: either the | |
| 499 * managing account itself or sub-accounts if the managing account is a | |
| 500 * multi-client account. | |
| 501 * | |
| 502 * Request parameters: | |
| 503 * | |
| 504 * [merchantId] - The ID of the managing account. | |
| 505 * | |
| 506 * [accountId] - The ID of the account for which to get/update account | |
| 507 * shipping settings. | |
| 508 * | |
| 509 * Completes with a [AccountShipping]. | |
| 510 * | |
| 511 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 512 * error. | |
| 513 * | |
| 514 * If the used [http.Client] completes with an error when making a REST call, | |
| 515 * this method will complete with the same error. | |
| 516 */ | |
| 517 async.Future<AccountShipping> get(core.String merchantId, core.String accountI
d) { | |
| 518 var _url = null; | |
| 519 var _queryParams = new core.Map(); | |
| 520 var _uploadMedia = null; | |
| 521 var _uploadOptions = null; | |
| 522 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 523 var _body = null; | |
| 524 | |
| 525 if (merchantId == null) { | |
| 526 throw new core.ArgumentError("Parameter merchantId is required."); | |
| 527 } | |
| 528 if (accountId == null) { | |
| 529 throw new core.ArgumentError("Parameter accountId is required."); | |
| 530 } | |
| 531 | |
| 532 _url = commons.Escaper.ecapeVariable('$merchantId') + '/accountshipping/' +
commons.Escaper.ecapeVariable('$accountId'); | |
| 533 | |
| 534 var _response = _requester.request(_url, | |
| 535 "GET", | |
| 536 body: _body, | |
| 537 queryParams: _queryParams, | |
| 538 uploadOptions: _uploadOptions, | |
| 539 uploadMedia: _uploadMedia, | |
| 540 downloadOptions: _downloadOptions); | |
| 541 return _response.then((data) => new AccountShipping.fromJson(data)); | |
| 542 } | |
| 543 | |
| 544 /** | |
| 545 * Lists the shipping settings of the sub-accounts in your Merchant Center | |
| 546 * account. This method can only be called for multi-client accounts. | |
| 547 * | |
| 548 * Request parameters: | |
| 549 * | |
| 550 * [merchantId] - The ID of the managing account. | |
| 551 * | |
| 552 * [maxResults] - The maximum number of shipping settings to return in the | |
| 553 * response, used for paging. | |
| 554 * | |
| 555 * [pageToken] - The token returned by the previous request. | |
| 556 * | |
| 557 * Completes with a [AccountshippingListResponse]. | |
| 558 * | |
| 559 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 560 * error. | |
| 561 * | |
| 562 * If the used [http.Client] completes with an error when making a REST call, | |
| 563 * this method will complete with the same error. | |
| 564 */ | |
| 565 async.Future<AccountshippingListResponse> list(core.String merchantId, {core.i
nt maxResults, core.String pageToken}) { | |
| 566 var _url = null; | |
| 567 var _queryParams = new core.Map(); | |
| 568 var _uploadMedia = null; | |
| 569 var _uploadOptions = null; | |
| 570 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 571 var _body = null; | |
| 572 | |
| 573 if (merchantId == null) { | |
| 574 throw new core.ArgumentError("Parameter merchantId is required."); | |
| 575 } | |
| 576 if (maxResults != null) { | |
| 577 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 578 } | |
| 579 if (pageToken != null) { | |
| 580 _queryParams["pageToken"] = [pageToken]; | |
| 581 } | |
| 582 | |
| 583 _url = commons.Escaper.ecapeVariable('$merchantId') + '/accountshipping'; | |
| 584 | |
| 585 var _response = _requester.request(_url, | |
| 586 "GET", | |
| 587 body: _body, | |
| 588 queryParams: _queryParams, | |
| 589 uploadOptions: _uploadOptions, | |
| 590 uploadMedia: _uploadMedia, | |
| 591 downloadOptions: _downloadOptions); | |
| 592 return _response.then((data) => new AccountshippingListResponse.fromJson(dat
a)); | |
| 593 } | |
| 594 | |
| 595 /** | |
| 596 * Updates the shipping settings of the account. This method can only be | |
| 597 * called for accounts to which the managing account has access: either the | |
| 598 * managing account itself or sub-accounts if the managing account is a | |
| 599 * multi-client account. This method supports patch semantics. | |
| 600 * | |
| 601 * [request] - The metadata request object. | |
| 602 * | |
| 603 * Request parameters: | |
| 604 * | |
| 605 * [merchantId] - The ID of the managing account. | |
| 606 * | |
| 607 * [accountId] - The ID of the account for which to get/update account | |
| 608 * shipping settings. | |
| 609 * | |
| 610 * [dryRun] - Flag to run the request in dry-run mode. | |
| 611 * | |
| 612 * Completes with a [AccountShipping]. | |
| 613 * | |
| 614 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 615 * error. | |
| 616 * | |
| 617 * If the used [http.Client] completes with an error when making a REST call, | |
| 618 * this method will complete with the same error. | |
| 619 */ | |
| 620 async.Future<AccountShipping> patch(AccountShipping request, core.String merch
antId, core.String accountId, {core.bool dryRun}) { | |
| 621 var _url = null; | |
| 622 var _queryParams = new core.Map(); | |
| 623 var _uploadMedia = null; | |
| 624 var _uploadOptions = null; | |
| 625 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 626 var _body = null; | |
| 627 | |
| 628 if (request != null) { | |
| 629 _body = convert.JSON.encode((request).toJson()); | |
| 630 } | |
| 631 if (merchantId == null) { | |
| 632 throw new core.ArgumentError("Parameter merchantId is required."); | |
| 633 } | |
| 634 if (accountId == null) { | |
| 635 throw new core.ArgumentError("Parameter accountId is required."); | |
| 636 } | |
| 637 if (dryRun != null) { | |
| 638 _queryParams["dryRun"] = ["${dryRun}"]; | |
| 639 } | |
| 640 | |
| 641 _url = commons.Escaper.ecapeVariable('$merchantId') + '/accountshipping/' +
commons.Escaper.ecapeVariable('$accountId'); | |
| 642 | |
| 643 var _response = _requester.request(_url, | |
| 644 "PATCH", | |
| 645 body: _body, | |
| 646 queryParams: _queryParams, | |
| 647 uploadOptions: _uploadOptions, | |
| 648 uploadMedia: _uploadMedia, | |
| 649 downloadOptions: _downloadOptions); | |
| 650 return _response.then((data) => new AccountShipping.fromJson(data)); | |
| 651 } | |
| 652 | |
| 653 /** | |
| 654 * Updates the shipping settings of the account. This method can only be | |
| 655 * called for accounts to which the managing account has access: either the | |
| 656 * managing account itself or sub-accounts if the managing account is a | |
| 657 * multi-client account. | |
| 658 * | |
| 659 * [request] - The metadata request object. | |
| 660 * | |
| 661 * Request parameters: | |
| 662 * | |
| 663 * [merchantId] - The ID of the managing account. | |
| 664 * | |
| 665 * [accountId] - The ID of the account for which to get/update account | |
| 666 * shipping settings. | |
| 667 * | |
| 668 * [dryRun] - Flag to run the request in dry-run mode. | |
| 669 * | |
| 670 * Completes with a [AccountShipping]. | |
| 671 * | |
| 672 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 673 * error. | |
| 674 * | |
| 675 * If the used [http.Client] completes with an error when making a REST call, | |
| 676 * this method will complete with the same error. | |
| 677 */ | |
| 678 async.Future<AccountShipping> update(AccountShipping request, core.String merc
hantId, core.String accountId, {core.bool dryRun}) { | |
| 679 var _url = null; | |
| 680 var _queryParams = new core.Map(); | |
| 681 var _uploadMedia = null; | |
| 682 var _uploadOptions = null; | |
| 683 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 684 var _body = null; | |
| 685 | |
| 686 if (request != null) { | |
| 687 _body = convert.JSON.encode((request).toJson()); | |
| 688 } | |
| 689 if (merchantId == null) { | |
| 690 throw new core.ArgumentError("Parameter merchantId is required."); | |
| 691 } | |
| 692 if (accountId == null) { | |
| 693 throw new core.ArgumentError("Parameter accountId is required."); | |
| 694 } | |
| 695 if (dryRun != null) { | |
| 696 _queryParams["dryRun"] = ["${dryRun}"]; | |
| 697 } | |
| 698 | |
| 699 _url = commons.Escaper.ecapeVariable('$merchantId') + '/accountshipping/' +
commons.Escaper.ecapeVariable('$accountId'); | |
| 700 | |
| 701 var _response = _requester.request(_url, | |
| 702 "PUT", | |
| 703 body: _body, | |
| 704 queryParams: _queryParams, | |
| 705 uploadOptions: _uploadOptions, | |
| 706 uploadMedia: _uploadMedia, | |
| 707 downloadOptions: _downloadOptions); | |
| 708 return _response.then((data) => new AccountShipping.fromJson(data)); | |
| 709 } | |
| 710 | |
| 711 } | |
| 712 | |
| 713 | |
| 714 class AccountstatusesResourceApi { | 444 class AccountstatusesResourceApi { |
| 715 final commons.ApiRequester _requester; | 445 final commons.ApiRequester _requester; |
| 716 | 446 |
| 717 AccountstatusesResourceApi(commons.ApiRequester client) : | 447 AccountstatusesResourceApi(commons.ApiRequester client) : |
| 718 _requester = client; | 448 _requester = client; |
| 719 | 449 |
| 720 /** | 450 /** |
| 721 * [request] - The metadata request object. | 451 * [request] - The metadata request object. |
| 722 * | 452 * |
| 723 * Request parameters: | 453 * Request parameters: |
| (...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1838 "POST", | 1568 "POST", |
| 1839 body: _body, | 1569 body: _body, |
| 1840 queryParams: _queryParams, | 1570 queryParams: _queryParams, |
| 1841 uploadOptions: _uploadOptions, | 1571 uploadOptions: _uploadOptions, |
| 1842 uploadMedia: _uploadMedia, | 1572 uploadMedia: _uploadMedia, |
| 1843 downloadOptions: _downloadOptions); | 1573 downloadOptions: _downloadOptions); |
| 1844 return _response.then((data) => new OrdersAdvanceTestOrderResponse.fromJson(
data)); | 1574 return _response.then((data) => new OrdersAdvanceTestOrderResponse.fromJson(
data)); |
| 1845 } | 1575 } |
| 1846 | 1576 |
| 1847 /** | 1577 /** |
| 1848 * Cancels all line items in an order. This method can only be called for | 1578 * Cancels all line items in an order, making a full refund. This method can |
| 1849 * non-multi-client accounts. | 1579 * only be called for non-multi-client accounts. |
| 1850 * | 1580 * |
| 1851 * [request] - The metadata request object. | 1581 * [request] - The metadata request object. |
| 1852 * | 1582 * |
| 1853 * Request parameters: | 1583 * Request parameters: |
| 1854 * | 1584 * |
| 1855 * [merchantId] - The ID of the managing account. | 1585 * [merchantId] - The ID of the managing account. |
| 1856 * | 1586 * |
| 1857 * [orderId] - The ID of the order to cancel. | 1587 * [orderId] - The ID of the order to cancel. |
| 1858 * | 1588 * |
| 1859 * Completes with a [OrdersCancelResponse]. | 1589 * Completes with a [OrdersCancelResponse]. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1888 "POST", | 1618 "POST", |
| 1889 body: _body, | 1619 body: _body, |
| 1890 queryParams: _queryParams, | 1620 queryParams: _queryParams, |
| 1891 uploadOptions: _uploadOptions, | 1621 uploadOptions: _uploadOptions, |
| 1892 uploadMedia: _uploadMedia, | 1622 uploadMedia: _uploadMedia, |
| 1893 downloadOptions: _downloadOptions); | 1623 downloadOptions: _downloadOptions); |
| 1894 return _response.then((data) => new OrdersCancelResponse.fromJson(data)); | 1624 return _response.then((data) => new OrdersCancelResponse.fromJson(data)); |
| 1895 } | 1625 } |
| 1896 | 1626 |
| 1897 /** | 1627 /** |
| 1898 * Cancels a line item. This method can only be called for non-multi-client | 1628 * Cancels a line item, making a full refund. This method can only be called |
| 1899 * accounts. | 1629 * for non-multi-client accounts. |
| 1900 * | 1630 * |
| 1901 * [request] - The metadata request object. | 1631 * [request] - The metadata request object. |
| 1902 * | 1632 * |
| 1903 * Request parameters: | 1633 * Request parameters: |
| 1904 * | 1634 * |
| 1905 * [merchantId] - The ID of the managing account. | 1635 * [merchantId] - The ID of the managing account. |
| 1906 * | 1636 * |
| 1907 * [orderId] - The ID of the order. | 1637 * [orderId] - The ID of the order. |
| 1908 * | 1638 * |
| 1909 * Completes with a [OrdersCancelLineItemResponse]. | 1639 * Completes with a [OrdersCancelLineItemResponse]. |
| (...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3405 if (aggregatorId != null) { | 3135 if (aggregatorId != null) { |
| 3406 _json["aggregatorId"] = aggregatorId; | 3136 _json["aggregatorId"] = aggregatorId; |
| 3407 } | 3137 } |
| 3408 if (merchantId != null) { | 3138 if (merchantId != null) { |
| 3409 _json["merchantId"] = merchantId; | 3139 _json["merchantId"] = merchantId; |
| 3410 } | 3140 } |
| 3411 return _json; | 3141 return _json; |
| 3412 } | 3142 } |
| 3413 } | 3143 } |
| 3414 | 3144 |
| 3415 /** The shipping settings of a merchant account. */ | |
| 3416 class AccountShipping { | |
| 3417 /** The ID of the account to which these account shipping settings belong. */ | |
| 3418 core.String accountId; | |
| 3419 /** Carrier-based shipping calculations. */ | |
| 3420 core.List<AccountShippingCarrierRate> carrierRates; | |
| 3421 /** | |
| 3422 * Identifies what kind of resource this is. Value: the fixed string | |
| 3423 * "content#accountShipping". | |
| 3424 */ | |
| 3425 core.String kind; | |
| 3426 /** Location groups for shipping. */ | |
| 3427 core.List<AccountShippingLocationGroup> locationGroups; | |
| 3428 /** Rate tables definitions. */ | |
| 3429 core.List<AccountShippingRateTable> rateTables; | |
| 3430 /** Shipping services describing shipping fees calculation. */ | |
| 3431 core.List<AccountShippingShippingService> services; | |
| 3432 | |
| 3433 AccountShipping(); | |
| 3434 | |
| 3435 AccountShipping.fromJson(core.Map _json) { | |
| 3436 if (_json.containsKey("accountId")) { | |
| 3437 accountId = _json["accountId"]; | |
| 3438 } | |
| 3439 if (_json.containsKey("carrierRates")) { | |
| 3440 carrierRates = _json["carrierRates"].map((value) => new AccountShippingCar
rierRate.fromJson(value)).toList(); | |
| 3441 } | |
| 3442 if (_json.containsKey("kind")) { | |
| 3443 kind = _json["kind"]; | |
| 3444 } | |
| 3445 if (_json.containsKey("locationGroups")) { | |
| 3446 locationGroups = _json["locationGroups"].map((value) => new AccountShippin
gLocationGroup.fromJson(value)).toList(); | |
| 3447 } | |
| 3448 if (_json.containsKey("rateTables")) { | |
| 3449 rateTables = _json["rateTables"].map((value) => new AccountShippingRateTab
le.fromJson(value)).toList(); | |
| 3450 } | |
| 3451 if (_json.containsKey("services")) { | |
| 3452 services = _json["services"].map((value) => new AccountShippingShippingSer
vice.fromJson(value)).toList(); | |
| 3453 } | |
| 3454 } | |
| 3455 | |
| 3456 core.Map toJson() { | |
| 3457 var _json = new core.Map(); | |
| 3458 if (accountId != null) { | |
| 3459 _json["accountId"] = accountId; | |
| 3460 } | |
| 3461 if (carrierRates != null) { | |
| 3462 _json["carrierRates"] = carrierRates.map((value) => (value).toJson()).toLi
st(); | |
| 3463 } | |
| 3464 if (kind != null) { | |
| 3465 _json["kind"] = kind; | |
| 3466 } | |
| 3467 if (locationGroups != null) { | |
| 3468 _json["locationGroups"] = locationGroups.map((value) => (value).toJson()).
toList(); | |
| 3469 } | |
| 3470 if (rateTables != null) { | |
| 3471 _json["rateTables"] = rateTables.map((value) => (value).toJson()).toList()
; | |
| 3472 } | |
| 3473 if (services != null) { | |
| 3474 _json["services"] = services.map((value) => (value).toJson()).toList(); | |
| 3475 } | |
| 3476 return _json; | |
| 3477 } | |
| 3478 } | |
| 3479 | |
| 3480 /** A carrier-calculated shipping rate. */ | |
| 3481 class AccountShippingCarrierRate { | |
| 3482 /** | |
| 3483 * The carrier that is responsible for the shipping, such as "UPS", "FedEx", | |
| 3484 * or "USPS". | |
| 3485 */ | |
| 3486 core.String carrier; | |
| 3487 /** The carrier service, such as "Ground" or "2Day". */ | |
| 3488 core.String carrierService; | |
| 3489 /** Additive shipping rate modifier. */ | |
| 3490 Price modifierFlatRate; | |
| 3491 /** | |
| 3492 * Multiplicative shipping rate modifier in percent. Represented as a floating | |
| 3493 * point number without the percentage character. | |
| 3494 */ | |
| 3495 core.String modifierPercent; | |
| 3496 /** The name of the carrier rate. */ | |
| 3497 core.String name; | |
| 3498 /** | |
| 3499 * The sale country for which this carrier rate is valid, represented as a | |
| 3500 * CLDR territory code. | |
| 3501 */ | |
| 3502 core.String saleCountry; | |
| 3503 /** Shipping origin represented as a postal code. */ | |
| 3504 core.String shippingOrigin; | |
| 3505 | |
| 3506 AccountShippingCarrierRate(); | |
| 3507 | |
| 3508 AccountShippingCarrierRate.fromJson(core.Map _json) { | |
| 3509 if (_json.containsKey("carrier")) { | |
| 3510 carrier = _json["carrier"]; | |
| 3511 } | |
| 3512 if (_json.containsKey("carrierService")) { | |
| 3513 carrierService = _json["carrierService"]; | |
| 3514 } | |
| 3515 if (_json.containsKey("modifierFlatRate")) { | |
| 3516 modifierFlatRate = new Price.fromJson(_json["modifierFlatRate"]); | |
| 3517 } | |
| 3518 if (_json.containsKey("modifierPercent")) { | |
| 3519 modifierPercent = _json["modifierPercent"]; | |
| 3520 } | |
| 3521 if (_json.containsKey("name")) { | |
| 3522 name = _json["name"]; | |
| 3523 } | |
| 3524 if (_json.containsKey("saleCountry")) { | |
| 3525 saleCountry = _json["saleCountry"]; | |
| 3526 } | |
| 3527 if (_json.containsKey("shippingOrigin")) { | |
| 3528 shippingOrigin = _json["shippingOrigin"]; | |
| 3529 } | |
| 3530 } | |
| 3531 | |
| 3532 core.Map toJson() { | |
| 3533 var _json = new core.Map(); | |
| 3534 if (carrier != null) { | |
| 3535 _json["carrier"] = carrier; | |
| 3536 } | |
| 3537 if (carrierService != null) { | |
| 3538 _json["carrierService"] = carrierService; | |
| 3539 } | |
| 3540 if (modifierFlatRate != null) { | |
| 3541 _json["modifierFlatRate"] = (modifierFlatRate).toJson(); | |
| 3542 } | |
| 3543 if (modifierPercent != null) { | |
| 3544 _json["modifierPercent"] = modifierPercent; | |
| 3545 } | |
| 3546 if (name != null) { | |
| 3547 _json["name"] = name; | |
| 3548 } | |
| 3549 if (saleCountry != null) { | |
| 3550 _json["saleCountry"] = saleCountry; | |
| 3551 } | |
| 3552 if (shippingOrigin != null) { | |
| 3553 _json["shippingOrigin"] = shippingOrigin; | |
| 3554 } | |
| 3555 return _json; | |
| 3556 } | |
| 3557 } | |
| 3558 | |
| 3559 class AccountShippingCondition { | |
| 3560 /** | |
| 3561 * Delivery location in terms of a location group name. A location group with | |
| 3562 * this name must be specified among location groups. | |
| 3563 */ | |
| 3564 core.String deliveryLocationGroup; | |
| 3565 /** | |
| 3566 * Delivery location in terms of a location ID. Can be used to represent | |
| 3567 * administrative areas, smaller country subdivisions, or cities. | |
| 3568 */ | |
| 3569 core.String deliveryLocationId; | |
| 3570 /** Delivery location in terms of a postal code. */ | |
| 3571 core.String deliveryPostalCode; | |
| 3572 /** Delivery location in terms of a postal code range. */ | |
| 3573 AccountShippingPostalCodeRange deliveryPostalCodeRange; | |
| 3574 /** | |
| 3575 * Maximum shipping price. Forms an interval between the maximum of smaller | |
| 3576 * prices (exclusive) and this price (inclusive). | |
| 3577 */ | |
| 3578 Price priceMax; | |
| 3579 /** | |
| 3580 * Shipping label of the product. The products with the label are matched. | |
| 3581 */ | |
| 3582 core.String shippingLabel; | |
| 3583 /** | |
| 3584 * Maximum shipping weight. Forms an interval between the maximum of smaller | |
| 3585 * weight (exclusive) and this weight (inclusive). | |
| 3586 */ | |
| 3587 Weight weightMax; | |
| 3588 | |
| 3589 AccountShippingCondition(); | |
| 3590 | |
| 3591 AccountShippingCondition.fromJson(core.Map _json) { | |
| 3592 if (_json.containsKey("deliveryLocationGroup")) { | |
| 3593 deliveryLocationGroup = _json["deliveryLocationGroup"]; | |
| 3594 } | |
| 3595 if (_json.containsKey("deliveryLocationId")) { | |
| 3596 deliveryLocationId = _json["deliveryLocationId"]; | |
| 3597 } | |
| 3598 if (_json.containsKey("deliveryPostalCode")) { | |
| 3599 deliveryPostalCode = _json["deliveryPostalCode"]; | |
| 3600 } | |
| 3601 if (_json.containsKey("deliveryPostalCodeRange")) { | |
| 3602 deliveryPostalCodeRange = new AccountShippingPostalCodeRange.fromJson(_jso
n["deliveryPostalCodeRange"]); | |
| 3603 } | |
| 3604 if (_json.containsKey("priceMax")) { | |
| 3605 priceMax = new Price.fromJson(_json["priceMax"]); | |
| 3606 } | |
| 3607 if (_json.containsKey("shippingLabel")) { | |
| 3608 shippingLabel = _json["shippingLabel"]; | |
| 3609 } | |
| 3610 if (_json.containsKey("weightMax")) { | |
| 3611 weightMax = new Weight.fromJson(_json["weightMax"]); | |
| 3612 } | |
| 3613 } | |
| 3614 | |
| 3615 core.Map toJson() { | |
| 3616 var _json = new core.Map(); | |
| 3617 if (deliveryLocationGroup != null) { | |
| 3618 _json["deliveryLocationGroup"] = deliveryLocationGroup; | |
| 3619 } | |
| 3620 if (deliveryLocationId != null) { | |
| 3621 _json["deliveryLocationId"] = deliveryLocationId; | |
| 3622 } | |
| 3623 if (deliveryPostalCode != null) { | |
| 3624 _json["deliveryPostalCode"] = deliveryPostalCode; | |
| 3625 } | |
| 3626 if (deliveryPostalCodeRange != null) { | |
| 3627 _json["deliveryPostalCodeRange"] = (deliveryPostalCodeRange).toJson(); | |
| 3628 } | |
| 3629 if (priceMax != null) { | |
| 3630 _json["priceMax"] = (priceMax).toJson(); | |
| 3631 } | |
| 3632 if (shippingLabel != null) { | |
| 3633 _json["shippingLabel"] = shippingLabel; | |
| 3634 } | |
| 3635 if (weightMax != null) { | |
| 3636 _json["weightMax"] = (weightMax).toJson(); | |
| 3637 } | |
| 3638 return _json; | |
| 3639 } | |
| 3640 } | |
| 3641 | |
| 3642 /** | |
| 3643 * A user-defined locations group in a given country. All the locations of the | |
| 3644 * group must be of the same type. | |
| 3645 */ | |
| 3646 class AccountShippingLocationGroup { | |
| 3647 /** | |
| 3648 * The CLDR territory code of the country in which this location group is. | |
| 3649 */ | |
| 3650 core.String country; | |
| 3651 /** | |
| 3652 * A location ID (also called criteria ID) representing administrative areas, | |
| 3653 * smaller country subdivisions (counties), or cities. | |
| 3654 */ | |
| 3655 core.List<core.String> locationIds; | |
| 3656 /** The name of the location group. */ | |
| 3657 core.String name; | |
| 3658 /** A postal code range representing a city or a set of cities. */ | |
| 3659 core.List<AccountShippingPostalCodeRange> postalCodeRanges; | |
| 3660 /** | |
| 3661 * A postal code representing a city or a set of cities. | |
| 3662 * - A single postal code (e.g., 12345) | |
| 3663 * - A postal code prefix followed by a star (e.g., 1234*) | |
| 3664 */ | |
| 3665 core.List<core.String> postalCodes; | |
| 3666 | |
| 3667 AccountShippingLocationGroup(); | |
| 3668 | |
| 3669 AccountShippingLocationGroup.fromJson(core.Map _json) { | |
| 3670 if (_json.containsKey("country")) { | |
| 3671 country = _json["country"]; | |
| 3672 } | |
| 3673 if (_json.containsKey("locationIds")) { | |
| 3674 locationIds = _json["locationIds"]; | |
| 3675 } | |
| 3676 if (_json.containsKey("name")) { | |
| 3677 name = _json["name"]; | |
| 3678 } | |
| 3679 if (_json.containsKey("postalCodeRanges")) { | |
| 3680 postalCodeRanges = _json["postalCodeRanges"].map((value) => new AccountShi
ppingPostalCodeRange.fromJson(value)).toList(); | |
| 3681 } | |
| 3682 if (_json.containsKey("postalCodes")) { | |
| 3683 postalCodes = _json["postalCodes"]; | |
| 3684 } | |
| 3685 } | |
| 3686 | |
| 3687 core.Map toJson() { | |
| 3688 var _json = new core.Map(); | |
| 3689 if (country != null) { | |
| 3690 _json["country"] = country; | |
| 3691 } | |
| 3692 if (locationIds != null) { | |
| 3693 _json["locationIds"] = locationIds; | |
| 3694 } | |
| 3695 if (name != null) { | |
| 3696 _json["name"] = name; | |
| 3697 } | |
| 3698 if (postalCodeRanges != null) { | |
| 3699 _json["postalCodeRanges"] = postalCodeRanges.map((value) => (value).toJson
()).toList(); | |
| 3700 } | |
| 3701 if (postalCodes != null) { | |
| 3702 _json["postalCodes"] = postalCodes; | |
| 3703 } | |
| 3704 return _json; | |
| 3705 } | |
| 3706 } | |
| 3707 | |
| 3708 /** | |
| 3709 * A postal code range, that can be either: | |
| 3710 * - A range of postal codes (e.g., start=12340, end=12359) | |
| 3711 * - A range of postal codes prefixes (e.g., start=1234* end=1235*). Prefixes | |
| 3712 * must be of the same length (e.g., start=12* end=2* is invalid). | |
| 3713 */ | |
| 3714 class AccountShippingPostalCodeRange { | |
| 3715 /** The last (inclusive) postal code or prefix of the range. */ | |
| 3716 core.String end; | |
| 3717 /** The first (inclusive) postal code or prefix of the range. */ | |
| 3718 core.String start; | |
| 3719 | |
| 3720 AccountShippingPostalCodeRange(); | |
| 3721 | |
| 3722 AccountShippingPostalCodeRange.fromJson(core.Map _json) { | |
| 3723 if (_json.containsKey("end")) { | |
| 3724 end = _json["end"]; | |
| 3725 } | |
| 3726 if (_json.containsKey("start")) { | |
| 3727 start = _json["start"]; | |
| 3728 } | |
| 3729 } | |
| 3730 | |
| 3731 core.Map toJson() { | |
| 3732 var _json = new core.Map(); | |
| 3733 if (end != null) { | |
| 3734 _json["end"] = end; | |
| 3735 } | |
| 3736 if (start != null) { | |
| 3737 _json["start"] = start; | |
| 3738 } | |
| 3739 return _json; | |
| 3740 } | |
| 3741 } | |
| 3742 | |
| 3743 /** | |
| 3744 * A single or bi-dimensional table of shipping rates. Each dimension is defined | |
| 3745 * in terms of consecutive price/weight ranges, delivery locations, or shipping | |
| 3746 * labels. | |
| 3747 */ | |
| 3748 class AccountShippingRateTable { | |
| 3749 /** | |
| 3750 * One-dimensional table cells define one condition along the same dimension. | |
| 3751 * Bi-dimensional table cells use two dimensions with respectively M and N | |
| 3752 * distinct values and must contain exactly M * N cells with distinct | |
| 3753 * conditions (for each possible value pairs). | |
| 3754 */ | |
| 3755 core.List<AccountShippingRateTableCell> content; | |
| 3756 /** The name of the rate table. */ | |
| 3757 core.String name; | |
| 3758 /** | |
| 3759 * The sale country for which this table is valid, represented as a CLDR | |
| 3760 * territory code. | |
| 3761 */ | |
| 3762 core.String saleCountry; | |
| 3763 | |
| 3764 AccountShippingRateTable(); | |
| 3765 | |
| 3766 AccountShippingRateTable.fromJson(core.Map _json) { | |
| 3767 if (_json.containsKey("content")) { | |
| 3768 content = _json["content"].map((value) => new AccountShippingRateTableCell
.fromJson(value)).toList(); | |
| 3769 } | |
| 3770 if (_json.containsKey("name")) { | |
| 3771 name = _json["name"]; | |
| 3772 } | |
| 3773 if (_json.containsKey("saleCountry")) { | |
| 3774 saleCountry = _json["saleCountry"]; | |
| 3775 } | |
| 3776 } | |
| 3777 | |
| 3778 core.Map toJson() { | |
| 3779 var _json = new core.Map(); | |
| 3780 if (content != null) { | |
| 3781 _json["content"] = content.map((value) => (value).toJson()).toList(); | |
| 3782 } | |
| 3783 if (name != null) { | |
| 3784 _json["name"] = name; | |
| 3785 } | |
| 3786 if (saleCountry != null) { | |
| 3787 _json["saleCountry"] = saleCountry; | |
| 3788 } | |
| 3789 return _json; | |
| 3790 } | |
| 3791 } | |
| 3792 | |
| 3793 class AccountShippingRateTableCell { | |
| 3794 /** | |
| 3795 * Conditions for which the cell is valid. All cells in a table must use the | |
| 3796 * same dimension or pair of dimensions among price, weight, shipping label or | |
| 3797 * delivery location. If no condition is specified, the cell acts as a | |
| 3798 * catch-all and matches all the elements that are not matched by other cells | |
| 3799 * in this dimension. | |
| 3800 */ | |
| 3801 AccountShippingCondition condition; | |
| 3802 /** The rate applicable if the cell conditions are matched. */ | |
| 3803 Price rate; | |
| 3804 | |
| 3805 AccountShippingRateTableCell(); | |
| 3806 | |
| 3807 AccountShippingRateTableCell.fromJson(core.Map _json) { | |
| 3808 if (_json.containsKey("condition")) { | |
| 3809 condition = new AccountShippingCondition.fromJson(_json["condition"]); | |
| 3810 } | |
| 3811 if (_json.containsKey("rate")) { | |
| 3812 rate = new Price.fromJson(_json["rate"]); | |
| 3813 } | |
| 3814 } | |
| 3815 | |
| 3816 core.Map toJson() { | |
| 3817 var _json = new core.Map(); | |
| 3818 if (condition != null) { | |
| 3819 _json["condition"] = (condition).toJson(); | |
| 3820 } | |
| 3821 if (rate != null) { | |
| 3822 _json["rate"] = (rate).toJson(); | |
| 3823 } | |
| 3824 return _json; | |
| 3825 } | |
| 3826 } | |
| 3827 | |
| 3828 /** Shipping services provided in a country. */ | |
| 3829 class AccountShippingShippingService { | |
| 3830 /** Whether the shipping service is available. */ | |
| 3831 core.bool active; | |
| 3832 /** Calculation method for the "simple" case that needs no rules. */ | |
| 3833 AccountShippingShippingServiceCalculationMethod calculationMethod; | |
| 3834 /** Decision tree for "complicated" shipping cost calculation. */ | |
| 3835 AccountShippingShippingServiceCostRule costRuleTree; | |
| 3836 /** | |
| 3837 * The maximum number of days in transit. Must be a value between 0 and 250 | |
| 3838 * included. A value of 0 means same day delivery. | |
| 3839 */ | |
| 3840 core.String maxDaysInTransit; | |
| 3841 /** | |
| 3842 * The minimum number of days in transit. Must be a value between 0 and | |
| 3843 * maxDaysIntransit included. A value of 0 means same day delivery. | |
| 3844 */ | |
| 3845 core.String minDaysInTransit; | |
| 3846 /** The name of this shipping service. */ | |
| 3847 core.String name; | |
| 3848 /** | |
| 3849 * The CLDR territory code of the sale country for which this service can be | |
| 3850 * used. | |
| 3851 */ | |
| 3852 core.String saleCountry; | |
| 3853 | |
| 3854 AccountShippingShippingService(); | |
| 3855 | |
| 3856 AccountShippingShippingService.fromJson(core.Map _json) { | |
| 3857 if (_json.containsKey("active")) { | |
| 3858 active = _json["active"]; | |
| 3859 } | |
| 3860 if (_json.containsKey("calculationMethod")) { | |
| 3861 calculationMethod = new AccountShippingShippingServiceCalculationMethod.fr
omJson(_json["calculationMethod"]); | |
| 3862 } | |
| 3863 if (_json.containsKey("costRuleTree")) { | |
| 3864 costRuleTree = new AccountShippingShippingServiceCostRule.fromJson(_json["
costRuleTree"]); | |
| 3865 } | |
| 3866 if (_json.containsKey("maxDaysInTransit")) { | |
| 3867 maxDaysInTransit = _json["maxDaysInTransit"]; | |
| 3868 } | |
| 3869 if (_json.containsKey("minDaysInTransit")) { | |
| 3870 minDaysInTransit = _json["minDaysInTransit"]; | |
| 3871 } | |
| 3872 if (_json.containsKey("name")) { | |
| 3873 name = _json["name"]; | |
| 3874 } | |
| 3875 if (_json.containsKey("saleCountry")) { | |
| 3876 saleCountry = _json["saleCountry"]; | |
| 3877 } | |
| 3878 } | |
| 3879 | |
| 3880 core.Map toJson() { | |
| 3881 var _json = new core.Map(); | |
| 3882 if (active != null) { | |
| 3883 _json["active"] = active; | |
| 3884 } | |
| 3885 if (calculationMethod != null) { | |
| 3886 _json["calculationMethod"] = (calculationMethod).toJson(); | |
| 3887 } | |
| 3888 if (costRuleTree != null) { | |
| 3889 _json["costRuleTree"] = (costRuleTree).toJson(); | |
| 3890 } | |
| 3891 if (maxDaysInTransit != null) { | |
| 3892 _json["maxDaysInTransit"] = maxDaysInTransit; | |
| 3893 } | |
| 3894 if (minDaysInTransit != null) { | |
| 3895 _json["minDaysInTransit"] = minDaysInTransit; | |
| 3896 } | |
| 3897 if (name != null) { | |
| 3898 _json["name"] = name; | |
| 3899 } | |
| 3900 if (saleCountry != null) { | |
| 3901 _json["saleCountry"] = saleCountry; | |
| 3902 } | |
| 3903 return _json; | |
| 3904 } | |
| 3905 } | |
| 3906 | |
| 3907 /** Shipping cost calculation method. Exactly one of the field is set. */ | |
| 3908 class AccountShippingShippingServiceCalculationMethod { | |
| 3909 /** Name of the carrier rate to use for the calculation. */ | |
| 3910 core.String carrierRate; | |
| 3911 /** Delivery is excluded. Valid only within cost rules tree. */ | |
| 3912 core.bool excluded; | |
| 3913 /** | |
| 3914 * Fixed price shipping, represented as a floating point number associated | |
| 3915 * with a currency. | |
| 3916 */ | |
| 3917 Price flatRate; | |
| 3918 /** | |
| 3919 * Percentage of the price, represented as a floating point number without the | |
| 3920 * percentage character. | |
| 3921 */ | |
| 3922 core.String percentageRate; | |
| 3923 /** Name of the rate table to use for the calculation. */ | |
| 3924 core.String rateTable; | |
| 3925 | |
| 3926 AccountShippingShippingServiceCalculationMethod(); | |
| 3927 | |
| 3928 AccountShippingShippingServiceCalculationMethod.fromJson(core.Map _json) { | |
| 3929 if (_json.containsKey("carrierRate")) { | |
| 3930 carrierRate = _json["carrierRate"]; | |
| 3931 } | |
| 3932 if (_json.containsKey("excluded")) { | |
| 3933 excluded = _json["excluded"]; | |
| 3934 } | |
| 3935 if (_json.containsKey("flatRate")) { | |
| 3936 flatRate = new Price.fromJson(_json["flatRate"]); | |
| 3937 } | |
| 3938 if (_json.containsKey("percentageRate")) { | |
| 3939 percentageRate = _json["percentageRate"]; | |
| 3940 } | |
| 3941 if (_json.containsKey("rateTable")) { | |
| 3942 rateTable = _json["rateTable"]; | |
| 3943 } | |
| 3944 } | |
| 3945 | |
| 3946 core.Map toJson() { | |
| 3947 var _json = new core.Map(); | |
| 3948 if (carrierRate != null) { | |
| 3949 _json["carrierRate"] = carrierRate; | |
| 3950 } | |
| 3951 if (excluded != null) { | |
| 3952 _json["excluded"] = excluded; | |
| 3953 } | |
| 3954 if (flatRate != null) { | |
| 3955 _json["flatRate"] = (flatRate).toJson(); | |
| 3956 } | |
| 3957 if (percentageRate != null) { | |
| 3958 _json["percentageRate"] = percentageRate; | |
| 3959 } | |
| 3960 if (rateTable != null) { | |
| 3961 _json["rateTable"] = rateTable; | |
| 3962 } | |
| 3963 return _json; | |
| 3964 } | |
| 3965 } | |
| 3966 | |
| 3967 /** | |
| 3968 * Building block of the cost calculation decision tree. | |
| 3969 * - The tree root should have no condition and no calculation method. | |
| 3970 * - All the children must have a condition on the same dimension. The first | |
| 3971 * child matching a condition is entered, therefore, price and weight conditions | |
| 3972 * form contiguous intervals. | |
| 3973 * - The last child of an element must have no condition and matches all | |
| 3974 * elements not previously matched. | |
| 3975 * - Children and calculation method are mutually exclusive, and exactly one of | |
| 3976 * them must be defined; the root must only have children. | |
| 3977 */ | |
| 3978 class AccountShippingShippingServiceCostRule { | |
| 3979 /** Final calculation method to be used only in leaf nodes. */ | |
| 3980 AccountShippingShippingServiceCalculationMethod calculationMethod; | |
| 3981 /** | |
| 3982 * Subsequent rules to be applied, only for inner nodes. The last child must | |
| 3983 * not specify a condition and acts as a catch-all. | |
| 3984 */ | |
| 3985 core.List<AccountShippingShippingServiceCostRule> children; | |
| 3986 /** | |
| 3987 * Condition for this rule to be applicable. If no condition is specified, the | |
| 3988 * rule acts as a catch-all. | |
| 3989 */ | |
| 3990 AccountShippingCondition condition; | |
| 3991 | |
| 3992 AccountShippingShippingServiceCostRule(); | |
| 3993 | |
| 3994 AccountShippingShippingServiceCostRule.fromJson(core.Map _json) { | |
| 3995 if (_json.containsKey("calculationMethod")) { | |
| 3996 calculationMethod = new AccountShippingShippingServiceCalculationMethod.fr
omJson(_json["calculationMethod"]); | |
| 3997 } | |
| 3998 if (_json.containsKey("children")) { | |
| 3999 children = _json["children"].map((value) => new AccountShippingShippingSer
viceCostRule.fromJson(value)).toList(); | |
| 4000 } | |
| 4001 if (_json.containsKey("condition")) { | |
| 4002 condition = new AccountShippingCondition.fromJson(_json["condition"]); | |
| 4003 } | |
| 4004 } | |
| 4005 | |
| 4006 core.Map toJson() { | |
| 4007 var _json = new core.Map(); | |
| 4008 if (calculationMethod != null) { | |
| 4009 _json["calculationMethod"] = (calculationMethod).toJson(); | |
| 4010 } | |
| 4011 if (children != null) { | |
| 4012 _json["children"] = children.map((value) => (value).toJson()).toList(); | |
| 4013 } | |
| 4014 if (condition != null) { | |
| 4015 _json["condition"] = (condition).toJson(); | |
| 4016 } | |
| 4017 return _json; | |
| 4018 } | |
| 4019 } | |
| 4020 | |
| 4021 /** | 3145 /** |
| 4022 * The status of an account, i.e., information about its products, which is | 3146 * The status of an account, i.e., information about its products, which is |
| 4023 * computed offline and not returned immediately at insertion time. | 3147 * computed offline and not returned immediately at insertion time. |
| 4024 */ | 3148 */ |
| 4025 class AccountStatus { | 3149 class AccountStatus { |
| 4026 /** The ID of the account for which the status is reported. */ | 3150 /** The ID of the account for which the status is reported. */ |
| 4027 core.String accountId; | 3151 core.String accountId; |
| 4028 /** A list of data quality issues. */ | 3152 /** A list of data quality issues. */ |
| 4029 core.List<AccountStatusDataQualityIssue> dataQualityIssues; | 3153 core.List<AccountStatusDataQualityIssue> dataQualityIssues; |
| 4030 /** | 3154 /** |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4582 if (nextPageToken != null) { | 3706 if (nextPageToken != null) { |
| 4583 _json["nextPageToken"] = nextPageToken; | 3707 _json["nextPageToken"] = nextPageToken; |
| 4584 } | 3708 } |
| 4585 if (resources != null) { | 3709 if (resources != null) { |
| 4586 _json["resources"] = resources.map((value) => (value).toJson()).toList(); | 3710 _json["resources"] = resources.map((value) => (value).toJson()).toList(); |
| 4587 } | 3711 } |
| 4588 return _json; | 3712 return _json; |
| 4589 } | 3713 } |
| 4590 } | 3714 } |
| 4591 | 3715 |
| 4592 class AccountshippingCustomBatchRequest { | |
| 4593 /** The request entries to be processed in the batch. */ | |
| 4594 core.List<AccountshippingCustomBatchRequestEntry> entries; | |
| 4595 | |
| 4596 AccountshippingCustomBatchRequest(); | |
| 4597 | |
| 4598 AccountshippingCustomBatchRequest.fromJson(core.Map _json) { | |
| 4599 if (_json.containsKey("entries")) { | |
| 4600 entries = _json["entries"].map((value) => new AccountshippingCustomBatchRe
questEntry.fromJson(value)).toList(); | |
| 4601 } | |
| 4602 } | |
| 4603 | |
| 4604 core.Map toJson() { | |
| 4605 var _json = new core.Map(); | |
| 4606 if (entries != null) { | |
| 4607 _json["entries"] = entries.map((value) => (value).toJson()).toList(); | |
| 4608 } | |
| 4609 return _json; | |
| 4610 } | |
| 4611 } | |
| 4612 | |
| 4613 /** A batch entry encoding a single non-batch accountshipping request. */ | |
| 4614 class AccountshippingCustomBatchRequestEntry { | |
| 4615 /** | |
| 4616 * The ID of the account for which to get/update account shipping settings. | |
| 4617 */ | |
| 4618 core.String accountId; | |
| 4619 /** | |
| 4620 * The account shipping settings to update. Only defined if the method is | |
| 4621 * update. | |
| 4622 */ | |
| 4623 AccountShipping accountShipping; | |
| 4624 /** An entry ID, unique within the batch request. */ | |
| 4625 core.int batchId; | |
| 4626 /** The ID of the managing account. */ | |
| 4627 core.String merchantId; | |
| 4628 core.String method; | |
| 4629 | |
| 4630 AccountshippingCustomBatchRequestEntry(); | |
| 4631 | |
| 4632 AccountshippingCustomBatchRequestEntry.fromJson(core.Map _json) { | |
| 4633 if (_json.containsKey("accountId")) { | |
| 4634 accountId = _json["accountId"]; | |
| 4635 } | |
| 4636 if (_json.containsKey("accountShipping")) { | |
| 4637 accountShipping = new AccountShipping.fromJson(_json["accountShipping"]); | |
| 4638 } | |
| 4639 if (_json.containsKey("batchId")) { | |
| 4640 batchId = _json["batchId"]; | |
| 4641 } | |
| 4642 if (_json.containsKey("merchantId")) { | |
| 4643 merchantId = _json["merchantId"]; | |
| 4644 } | |
| 4645 if (_json.containsKey("method")) { | |
| 4646 method = _json["method"]; | |
| 4647 } | |
| 4648 } | |
| 4649 | |
| 4650 core.Map toJson() { | |
| 4651 var _json = new core.Map(); | |
| 4652 if (accountId != null) { | |
| 4653 _json["accountId"] = accountId; | |
| 4654 } | |
| 4655 if (accountShipping != null) { | |
| 4656 _json["accountShipping"] = (accountShipping).toJson(); | |
| 4657 } | |
| 4658 if (batchId != null) { | |
| 4659 _json["batchId"] = batchId; | |
| 4660 } | |
| 4661 if (merchantId != null) { | |
| 4662 _json["merchantId"] = merchantId; | |
| 4663 } | |
| 4664 if (method != null) { | |
| 4665 _json["method"] = method; | |
| 4666 } | |
| 4667 return _json; | |
| 4668 } | |
| 4669 } | |
| 4670 | |
| 4671 class AccountshippingCustomBatchResponse { | |
| 4672 /** The result of the execution of the batch requests. */ | |
| 4673 core.List<AccountshippingCustomBatchResponseEntry> entries; | |
| 4674 /** | |
| 4675 * Identifies what kind of resource this is. Value: the fixed string | |
| 4676 * "content#accountshippingCustomBatchResponse". | |
| 4677 */ | |
| 4678 core.String kind; | |
| 4679 | |
| 4680 AccountshippingCustomBatchResponse(); | |
| 4681 | |
| 4682 AccountshippingCustomBatchResponse.fromJson(core.Map _json) { | |
| 4683 if (_json.containsKey("entries")) { | |
| 4684 entries = _json["entries"].map((value) => new AccountshippingCustomBatchRe
sponseEntry.fromJson(value)).toList(); | |
| 4685 } | |
| 4686 if (_json.containsKey("kind")) { | |
| 4687 kind = _json["kind"]; | |
| 4688 } | |
| 4689 } | |
| 4690 | |
| 4691 core.Map toJson() { | |
| 4692 var _json = new core.Map(); | |
| 4693 if (entries != null) { | |
| 4694 _json["entries"] = entries.map((value) => (value).toJson()).toList(); | |
| 4695 } | |
| 4696 if (kind != null) { | |
| 4697 _json["kind"] = kind; | |
| 4698 } | |
| 4699 return _json; | |
| 4700 } | |
| 4701 } | |
| 4702 | |
| 4703 /** A batch entry encoding a single non-batch accountshipping response. */ | |
| 4704 class AccountshippingCustomBatchResponseEntry { | |
| 4705 /** The retrieved or updated account shipping settings. */ | |
| 4706 AccountShipping accountShipping; | |
| 4707 /** The ID of the request entry this entry responds to. */ | |
| 4708 core.int batchId; | |
| 4709 /** A list of errors defined if and only if the request failed. */ | |
| 4710 Errors errors; | |
| 4711 /** | |
| 4712 * Identifies what kind of resource this is. Value: the fixed string | |
| 4713 * "content#accountshippingCustomBatchResponseEntry". | |
| 4714 */ | |
| 4715 core.String kind; | |
| 4716 | |
| 4717 AccountshippingCustomBatchResponseEntry(); | |
| 4718 | |
| 4719 AccountshippingCustomBatchResponseEntry.fromJson(core.Map _json) { | |
| 4720 if (_json.containsKey("accountShipping")) { | |
| 4721 accountShipping = new AccountShipping.fromJson(_json["accountShipping"]); | |
| 4722 } | |
| 4723 if (_json.containsKey("batchId")) { | |
| 4724 batchId = _json["batchId"]; | |
| 4725 } | |
| 4726 if (_json.containsKey("errors")) { | |
| 4727 errors = new Errors.fromJson(_json["errors"]); | |
| 4728 } | |
| 4729 if (_json.containsKey("kind")) { | |
| 4730 kind = _json["kind"]; | |
| 4731 } | |
| 4732 } | |
| 4733 | |
| 4734 core.Map toJson() { | |
| 4735 var _json = new core.Map(); | |
| 4736 if (accountShipping != null) { | |
| 4737 _json["accountShipping"] = (accountShipping).toJson(); | |
| 4738 } | |
| 4739 if (batchId != null) { | |
| 4740 _json["batchId"] = batchId; | |
| 4741 } | |
| 4742 if (errors != null) { | |
| 4743 _json["errors"] = (errors).toJson(); | |
| 4744 } | |
| 4745 if (kind != null) { | |
| 4746 _json["kind"] = kind; | |
| 4747 } | |
| 4748 return _json; | |
| 4749 } | |
| 4750 } | |
| 4751 | |
| 4752 class AccountshippingListResponse { | |
| 4753 /** | |
| 4754 * Identifies what kind of resource this is. Value: the fixed string | |
| 4755 * "content#accountshippingListResponse". | |
| 4756 */ | |
| 4757 core.String kind; | |
| 4758 /** | |
| 4759 * The token for the retrieval of the next page of account shipping settings. | |
| 4760 */ | |
| 4761 core.String nextPageToken; | |
| 4762 core.List<AccountShipping> resources; | |
| 4763 | |
| 4764 AccountshippingListResponse(); | |
| 4765 | |
| 4766 AccountshippingListResponse.fromJson(core.Map _json) { | |
| 4767 if (_json.containsKey("kind")) { | |
| 4768 kind = _json["kind"]; | |
| 4769 } | |
| 4770 if (_json.containsKey("nextPageToken")) { | |
| 4771 nextPageToken = _json["nextPageToken"]; | |
| 4772 } | |
| 4773 if (_json.containsKey("resources")) { | |
| 4774 resources = _json["resources"].map((value) => new AccountShipping.fromJson
(value)).toList(); | |
| 4775 } | |
| 4776 } | |
| 4777 | |
| 4778 core.Map toJson() { | |
| 4779 var _json = new core.Map(); | |
| 4780 if (kind != null) { | |
| 4781 _json["kind"] = kind; | |
| 4782 } | |
| 4783 if (nextPageToken != null) { | |
| 4784 _json["nextPageToken"] = nextPageToken; | |
| 4785 } | |
| 4786 if (resources != null) { | |
| 4787 _json["resources"] = resources.map((value) => (value).toJson()).toList(); | |
| 4788 } | |
| 4789 return _json; | |
| 4790 } | |
| 4791 } | |
| 4792 | |
| 4793 class AccountstatusesCustomBatchRequest { | 3716 class AccountstatusesCustomBatchRequest { |
| 4794 /** The request entries to be processed in the batch. */ | 3717 /** The request entries to be processed in the batch. */ |
| 4795 core.List<AccountstatusesCustomBatchRequestEntry> entries; | 3718 core.List<AccountstatusesCustomBatchRequestEntry> entries; |
| 4796 | 3719 |
| 4797 AccountstatusesCustomBatchRequest(); | 3720 AccountstatusesCustomBatchRequest(); |
| 4798 | 3721 |
| 4799 AccountstatusesCustomBatchRequest.fromJson(core.Map _json) { | 3722 AccountstatusesCustomBatchRequest.fromJson(core.Map _json) { |
| 4800 if (_json.containsKey("entries")) { | 3723 if (_json.containsKey("entries")) { |
| 4801 entries = _json["entries"].map((value) => new AccountstatusesCustomBatchRe
questEntry.fromJson(value)).toList(); | 3724 entries = _json["entries"].map((value) => new AccountstatusesCustomBatchRe
questEntry.fromJson(value)).toList(); |
| 4802 } | 3725 } |
| (...skipping 6535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11338 | 10261 |
| 11339 core.Map toJson() { | 10262 core.Map toJson() { |
| 11340 var _json = new core.Map(); | 10263 var _json = new core.Map(); |
| 11341 if (entries != null) { | 10264 if (entries != null) { |
| 11342 _json["entries"] = entries.map((value) => (value).toJson()).toList(); | 10265 _json["entries"] = entries.map((value) => (value).toJson()).toList(); |
| 11343 } | 10266 } |
| 11344 return _json; | 10267 return _json; |
| 11345 } | 10268 } |
| 11346 } | 10269 } |
| 11347 | 10270 |
| 11348 /** A batch entry encoding a single non-batch accountshipping request. */ | 10271 /** A batch entry encoding a single non-batch shippingsettings request. */ |
| 11349 class ShippingsettingsCustomBatchRequestEntry { | 10272 class ShippingsettingsCustomBatchRequestEntry { |
| 11350 /** | 10273 /** |
| 11351 * The ID of the account for which to get/update account shipping settings. | 10274 * The ID of the account for which to get/update account shipping settings. |
| 11352 */ | 10275 */ |
| 11353 core.String accountId; | 10276 core.String accountId; |
| 11354 /** An entry ID, unique within the batch request. */ | 10277 /** An entry ID, unique within the batch request. */ |
| 11355 core.int batchId; | 10278 core.int batchId; |
| 11356 /** The ID of the managing account. */ | 10279 /** The ID of the managing account. */ |
| 11357 core.String merchantId; | 10280 core.String merchantId; |
| 11358 core.String method; | 10281 core.String method; |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12059 var _json = new core.Map(); | 10982 var _json = new core.Map(); |
| 12060 if (unit != null) { | 10983 if (unit != null) { |
| 12061 _json["unit"] = unit; | 10984 _json["unit"] = unit; |
| 12062 } | 10985 } |
| 12063 if (value != null) { | 10986 if (value != null) { |
| 12064 _json["value"] = value; | 10987 _json["value"] = value; |
| 12065 } | 10988 } |
| 12066 return _json; | 10989 return _json; |
| 12067 } | 10990 } |
| 12068 } | 10991 } |
| OLD | NEW |