| Index: generated/googleapis/lib/content/v2.dart
|
| diff --git a/generated/googleapis/lib/content/v2.dart b/generated/googleapis/lib/content/v2.dart
|
| index 040981153d19389d2fb14c9d57ac734ee3bfe32a..77054cdce0c5a6198240c1549606b496a03bcab7 100644
|
| --- a/generated/googleapis/lib/content/v2.dart
|
| +++ b/generated/googleapis/lib/content/v2.dart
|
| @@ -35,6 +35,7 @@ class ContentApi {
|
| OrdersResourceApi get orders => new OrdersResourceApi(_requester);
|
| ProductsResourceApi get products => new ProductsResourceApi(_requester);
|
| ProductstatusesResourceApi get productstatuses => new ProductstatusesResourceApi(_requester);
|
| + ShippingsettingsResourceApi get shippingsettings => new ShippingsettingsResourceApi(_requester);
|
|
|
| ContentApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com/", core.String servicePath: "content/v2/"}) :
|
| _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
|
| @@ -2864,6 +2865,307 @@ class ProductstatusesResourceApi {
|
| }
|
|
|
|
|
| +class ShippingsettingsResourceApi {
|
| + final commons.ApiRequester _requester;
|
| +
|
| + ShippingsettingsResourceApi(commons.ApiRequester client) :
|
| + _requester = client;
|
| +
|
| + /**
|
| + * Retrieves and updates the shipping settings of multiple accounts in a
|
| + * single request.
|
| + *
|
| + * [request] - The metadata request object.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [dryRun] - Flag to run the request in dry-run mode.
|
| + *
|
| + * Completes with a [ShippingsettingsCustomBatchResponse].
|
| + *
|
| + * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<ShippingsettingsCustomBatchResponse> custombatch(ShippingsettingsCustomBatchRequest request, {core.bool dryRun}) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = commons.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (request != null) {
|
| + _body = convert.JSON.encode((request).toJson());
|
| + }
|
| + if (dryRun != null) {
|
| + _queryParams["dryRun"] = ["${dryRun}"];
|
| + }
|
| +
|
| + _url = 'shippingsettings/batch';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new ShippingsettingsCustomBatchResponse.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Retrieves the shipping settings of the account.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [merchantId] - The ID of the managing account.
|
| + *
|
| + * [accountId] - The ID of the account for which to get/update shipping
|
| + * settings.
|
| + *
|
| + * Completes with a [ShippingSettings].
|
| + *
|
| + * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<ShippingSettings> get(core.String merchantId, core.String accountId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = commons.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (merchantId == null) {
|
| + throw new core.ArgumentError("Parameter merchantId is required.");
|
| + }
|
| + if (accountId == null) {
|
| + throw new core.ArgumentError("Parameter accountId is required.");
|
| + }
|
| +
|
| + _url = commons.Escaper.ecapeVariable('$merchantId') + '/shippingsettings/' + commons.Escaper.ecapeVariable('$accountId');
|
| +
|
| + var _response = _requester.request(_url,
|
| + "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new ShippingSettings.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Retrieves supported carriers and carrier services for an account.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [merchantId] - The ID of the account for which to retrieve the supported
|
| + * carriers.
|
| + *
|
| + * Completes with a [ShippingsettingsGetSupportedCarriersResponse].
|
| + *
|
| + * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<ShippingsettingsGetSupportedCarriersResponse> getsupportedcarriers(core.String merchantId) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = commons.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (merchantId == null) {
|
| + throw new core.ArgumentError("Parameter merchantId is required.");
|
| + }
|
| +
|
| + _url = commons.Escaper.ecapeVariable('$merchantId') + '/supportedCarriers';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new ShippingsettingsGetSupportedCarriersResponse.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Lists the shipping settings of the sub-accounts in your Merchant Center
|
| + * account.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [merchantId] - The ID of the managing account.
|
| + *
|
| + * [maxResults] - The maximum number of shipping settings to return in the
|
| + * response, used for paging.
|
| + *
|
| + * [pageToken] - The token returned by the previous request.
|
| + *
|
| + * Completes with a [ShippingsettingsListResponse].
|
| + *
|
| + * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<ShippingsettingsListResponse> list(core.String merchantId, {core.int maxResults, core.String pageToken}) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = commons.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (merchantId == null) {
|
| + throw new core.ArgumentError("Parameter merchantId is required.");
|
| + }
|
| + if (maxResults != null) {
|
| + _queryParams["maxResults"] = ["${maxResults}"];
|
| + }
|
| + if (pageToken != null) {
|
| + _queryParams["pageToken"] = [pageToken];
|
| + }
|
| +
|
| + _url = commons.Escaper.ecapeVariable('$merchantId') + '/shippingsettings';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "GET",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new ShippingsettingsListResponse.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Updates the shipping settings of the account. This method supports patch
|
| + * semantics.
|
| + *
|
| + * [request] - The metadata request object.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [merchantId] - The ID of the managing account.
|
| + *
|
| + * [accountId] - The ID of the account for which to get/update shipping
|
| + * settings.
|
| + *
|
| + * [dryRun] - Flag to run the request in dry-run mode.
|
| + *
|
| + * Completes with a [ShippingSettings].
|
| + *
|
| + * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<ShippingSettings> patch(ShippingSettings request, core.String merchantId, core.String accountId, {core.bool dryRun}) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = commons.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (request != null) {
|
| + _body = convert.JSON.encode((request).toJson());
|
| + }
|
| + if (merchantId == null) {
|
| + throw new core.ArgumentError("Parameter merchantId is required.");
|
| + }
|
| + if (accountId == null) {
|
| + throw new core.ArgumentError("Parameter accountId is required.");
|
| + }
|
| + if (dryRun != null) {
|
| + _queryParams["dryRun"] = ["${dryRun}"];
|
| + }
|
| +
|
| + _url = commons.Escaper.ecapeVariable('$merchantId') + '/shippingsettings/' + commons.Escaper.ecapeVariable('$accountId');
|
| +
|
| + var _response = _requester.request(_url,
|
| + "PATCH",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new ShippingSettings.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Updates the shipping settings of the account.
|
| + *
|
| + * [request] - The metadata request object.
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [merchantId] - The ID of the managing account.
|
| + *
|
| + * [accountId] - The ID of the account for which to get/update shipping
|
| + * settings.
|
| + *
|
| + * [dryRun] - Flag to run the request in dry-run mode.
|
| + *
|
| + * Completes with a [ShippingSettings].
|
| + *
|
| + * Completes with a [commons.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<ShippingSettings> update(ShippingSettings request, core.String merchantId, core.String accountId, {core.bool dryRun}) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = commons.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (request != null) {
|
| + _body = convert.JSON.encode((request).toJson());
|
| + }
|
| + if (merchantId == null) {
|
| + throw new core.ArgumentError("Parameter merchantId is required.");
|
| + }
|
| + if (accountId == null) {
|
| + throw new core.ArgumentError("Parameter accountId is required.");
|
| + }
|
| + if (dryRun != null) {
|
| + _queryParams["dryRun"] = ["${dryRun}"];
|
| + }
|
| +
|
| + _url = commons.Escaper.ecapeVariable('$merchantId') + '/shippingsettings/' + commons.Escaper.ecapeVariable('$accountId');
|
| +
|
| + var _response = _requester.request(_url,
|
| + "PUT",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new ShippingSettings.fromJson(data));
|
| + }
|
| +
|
| +}
|
| +
|
| +
|
|
|
| /** Account data. */
|
| class Account {
|
| @@ -4773,6 +5075,122 @@ class AccounttaxListResponse {
|
| }
|
| }
|
|
|
| +class CarrierRate {
|
| + /**
|
| + * Carrier service, such as "UPS" or "Fedex". The list of supported carriers
|
| + * can be retrieved via the getSupportedCarriers method. Required.
|
| + */
|
| + core.String carrierName;
|
| + /**
|
| + * Carrier service, such as "ground" or "2 days". The list of supported
|
| + * services for a carrier can be retrieved via the getSupportedCarriers
|
| + * method. Required.
|
| + */
|
| + core.String carrierService;
|
| + /**
|
| + * Additive shipping rate modifier. Can be negative. For example { "value":
|
| + * "1", "currency" : "USD" } adds $1 to the rate, { "value": "-3", "currency"
|
| + * : "USD" } removes $3 from the rate. Optional.
|
| + */
|
| + Price flatAdjustment;
|
| + /** Name of the carrier rate. Must be unique per rate group. Required. */
|
| + core.String name;
|
| + /** Shipping origin for this carrier rate. Required. */
|
| + core.String originPostalCode;
|
| + /**
|
| + * Multiplicative shipping rate modifier as a number in decimal notation. Can
|
| + * be negative. For example "5.4" increases the rate by 5.4%, "-3" decreases
|
| + * the rate by 3%. Optional.
|
| + */
|
| + core.String percentageAdjustment;
|
| +
|
| + CarrierRate();
|
| +
|
| + CarrierRate.fromJson(core.Map _json) {
|
| + if (_json.containsKey("carrierName")) {
|
| + carrierName = _json["carrierName"];
|
| + }
|
| + if (_json.containsKey("carrierService")) {
|
| + carrierService = _json["carrierService"];
|
| + }
|
| + if (_json.containsKey("flatAdjustment")) {
|
| + flatAdjustment = new Price.fromJson(_json["flatAdjustment"]);
|
| + }
|
| + if (_json.containsKey("name")) {
|
| + name = _json["name"];
|
| + }
|
| + if (_json.containsKey("originPostalCode")) {
|
| + originPostalCode = _json["originPostalCode"];
|
| + }
|
| + if (_json.containsKey("percentageAdjustment")) {
|
| + percentageAdjustment = _json["percentageAdjustment"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (carrierName != null) {
|
| + _json["carrierName"] = carrierName;
|
| + }
|
| + if (carrierService != null) {
|
| + _json["carrierService"] = carrierService;
|
| + }
|
| + if (flatAdjustment != null) {
|
| + _json["flatAdjustment"] = (flatAdjustment).toJson();
|
| + }
|
| + if (name != null) {
|
| + _json["name"] = name;
|
| + }
|
| + if (originPostalCode != null) {
|
| + _json["originPostalCode"] = originPostalCode;
|
| + }
|
| + if (percentageAdjustment != null) {
|
| + _json["percentageAdjustment"] = percentageAdjustment;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class CarriersCarrier {
|
| + /** The CLDR country code of the carrier (e.g., "US"). Always present. */
|
| + core.String country;
|
| + /** The name of the carrier (e.g., "UPS"). Always present. */
|
| + core.String name;
|
| + /**
|
| + * A list of supported services (e.g., "ground") for that carrier. Contains at
|
| + * least one service.
|
| + */
|
| + core.List<core.String> services;
|
| +
|
| + CarriersCarrier();
|
| +
|
| + CarriersCarrier.fromJson(core.Map _json) {
|
| + if (_json.containsKey("country")) {
|
| + country = _json["country"];
|
| + }
|
| + if (_json.containsKey("name")) {
|
| + name = _json["name"];
|
| + }
|
| + if (_json.containsKey("services")) {
|
| + services = _json["services"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (country != null) {
|
| + _json["country"] = country;
|
| + }
|
| + if (name != null) {
|
| + _json["name"] = name;
|
| + }
|
| + if (services != null) {
|
| + _json["services"] = services;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| /** Datafeed data. */
|
| class Datafeed {
|
| /**
|
| @@ -5560,6 +5978,42 @@ class DatafeedstatusesListResponse {
|
| }
|
| }
|
|
|
| +class DeliveryTime {
|
| + /**
|
| + * Maximum number of business days that is spent in transit. 0 means same day
|
| + * delivery, 1 means next day delivery. Must be greater than or equal to
|
| + * minTransitTimeInDays. Required.
|
| + */
|
| + core.int maxTransitTimeInDays;
|
| + /**
|
| + * Minimum number of business days that is spent in transit. 0 means same day
|
| + * delivery, 1 means next day delivery. Required.
|
| + */
|
| + core.int minTransitTimeInDays;
|
| +
|
| + DeliveryTime();
|
| +
|
| + DeliveryTime.fromJson(core.Map _json) {
|
| + if (_json.containsKey("maxTransitTimeInDays")) {
|
| + maxTransitTimeInDays = _json["maxTransitTimeInDays"];
|
| + }
|
| + if (_json.containsKey("minTransitTimeInDays")) {
|
| + minTransitTimeInDays = _json["minTransitTimeInDays"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (maxTransitTimeInDays != null) {
|
| + _json["maxTransitTimeInDays"] = maxTransitTimeInDays;
|
| + }
|
| + if (minTransitTimeInDays != null) {
|
| + _json["minTransitTimeInDays"] = minTransitTimeInDays;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| /** An error returned by the API. */
|
| class Error {
|
| /** The domain of the error. */
|
| @@ -5636,6 +6090,87 @@ class Errors {
|
| }
|
| }
|
|
|
| +/**
|
| + * A non-empty list of row or column headers for a table. Exactly one of prices,
|
| + * weights, numItems, postalCodeGroupNames, or locations must be set.
|
| + */
|
| +class Headers {
|
| + /**
|
| + * A list of location ID sets. Must be non-empty. Can only be set if all other
|
| + * fields are not set.
|
| + */
|
| + core.List<LocationIdSet> locations;
|
| + /**
|
| + * A list of inclusive number of items upper bounds. The last value can be
|
| + * "infinity". For example ["10", "50", "infinity"] represents the headers "<=
|
| + * 10 items", " 50 items". Must be non-empty. Can only be set if all other
|
| + * fields are not set.
|
| + */
|
| + core.List<core.String> numberOfItems;
|
| + /**
|
| + * A list of postal group names. The last value can be "all other locations".
|
| + * Example: ["zone 1", "zone 2", "all other locations"]. The referred postal
|
| + * code groups must match the delivery country of the service. Must be
|
| + * non-empty. Can only be set if all other fields are not set.
|
| + */
|
| + core.List<core.String> postalCodeGroupNames;
|
| + /**
|
| + * be "infinity". For example [{"value": "10", "currency": "USD"}, {"value":
|
| + * "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}]
|
| + * represents the headers "<= $10", " $500". All prices within a service must
|
| + * have the same currency. Must be non-empty. Can only be set if all other
|
| + * fields are not set.
|
| + */
|
| + core.List<Price> prices;
|
| + /**
|
| + * be "infinity". For example [{"value": "10", "unit": "kg"}, {"value": "50",
|
| + * "unit": "kg"}, {"value": "infinity", "unit": "kg"}] represents the headers
|
| + * "<= 10kg", " 50kg". All weights within a service must have the same unit.
|
| + * Must be non-empty. Can only be set if all other fields are not set.
|
| + */
|
| + core.List<Weight> weights;
|
| +
|
| + Headers();
|
| +
|
| + Headers.fromJson(core.Map _json) {
|
| + if (_json.containsKey("locations")) {
|
| + locations = _json["locations"].map((value) => new LocationIdSet.fromJson(value)).toList();
|
| + }
|
| + if (_json.containsKey("numberOfItems")) {
|
| + numberOfItems = _json["numberOfItems"];
|
| + }
|
| + if (_json.containsKey("postalCodeGroupNames")) {
|
| + postalCodeGroupNames = _json["postalCodeGroupNames"];
|
| + }
|
| + if (_json.containsKey("prices")) {
|
| + prices = _json["prices"].map((value) => new Price.fromJson(value)).toList();
|
| + }
|
| + if (_json.containsKey("weights")) {
|
| + weights = _json["weights"].map((value) => new Weight.fromJson(value)).toList();
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (locations != null) {
|
| + _json["locations"] = locations.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (numberOfItems != null) {
|
| + _json["numberOfItems"] = numberOfItems;
|
| + }
|
| + if (postalCodeGroupNames != null) {
|
| + _json["postalCodeGroupNames"] = postalCodeGroupNames;
|
| + }
|
| + if (prices != null) {
|
| + _json["prices"] = prices.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (weights != null) {
|
| + _json["weights"] = weights.map((value) => (value).toJson()).toList();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| class Installment {
|
| /** The amount the buyer has to pay per month. */
|
| Price amount;
|
| @@ -6026,8 +6561,32 @@ class InventorySetResponse {
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (kind != null) {
|
| - _json["kind"] = kind;
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class LocationIdSet {
|
| + /**
|
| + * A non-empty list of location IDs. They must all be of the same location
|
| + * type (e.g., state).
|
| + */
|
| + core.List<core.String> locationIds;
|
| +
|
| + LocationIdSet();
|
| +
|
| + LocationIdSet.fromJson(core.Map _json) {
|
| + if (_json.containsKey("locationIds")) {
|
| + locationIds = _json["locationIds"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (locationIds != null) {
|
| + _json["locationIds"] = locationIds;
|
| }
|
| return _json;
|
| }
|
| @@ -8609,6 +9168,87 @@ class OrdersUpdateShipmentResponse {
|
| }
|
| }
|
|
|
| +class PostalCodeGroup {
|
| + /**
|
| + * The CLDR territory code of the country the postal code group applies to.
|
| + * Required.
|
| + */
|
| + core.String country;
|
| + /** The name of the postal code group, referred to in headers. Required. */
|
| + core.String name;
|
| + /** A range of postal codes. Required. */
|
| + core.List<PostalCodeRange> postalCodeRanges;
|
| +
|
| + PostalCodeGroup();
|
| +
|
| + PostalCodeGroup.fromJson(core.Map _json) {
|
| + if (_json.containsKey("country")) {
|
| + country = _json["country"];
|
| + }
|
| + if (_json.containsKey("name")) {
|
| + name = _json["name"];
|
| + }
|
| + if (_json.containsKey("postalCodeRanges")) {
|
| + postalCodeRanges = _json["postalCodeRanges"].map((value) => new PostalCodeRange.fromJson(value)).toList();
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (country != null) {
|
| + _json["country"] = country;
|
| + }
|
| + if (name != null) {
|
| + _json["name"] = name;
|
| + }
|
| + if (postalCodeRanges != null) {
|
| + _json["postalCodeRanges"] = postalCodeRanges.map((value) => (value).toJson()).toList();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class PostalCodeRange {
|
| + /**
|
| + * A postal code or a pattern of the form prefix* denoting the inclusive lower
|
| + * bound of the range defining the area. Examples values: "94108", "9410*",
|
| + * "9*". Required.
|
| + */
|
| + core.String postalCodeRangeBegin;
|
| + /**
|
| + * A postal code or a pattern of the form prefix* denoting the inclusive upper
|
| + * bound of the range defining the area. It must have the same length as
|
| + * postalCodeRangeBegin: if postalCodeRangeBegin is a postal code then
|
| + * postalCodeRangeEnd must be a postal code too; if postalCodeRangeBegin is a
|
| + * pattern then postalCodeRangeEnd must be a pattern with the same prefix
|
| + * length. Optional: if not set, then the area is defined as being all the
|
| + * postal codes matching postalCodeRangeBegin.
|
| + */
|
| + core.String postalCodeRangeEnd;
|
| +
|
| + PostalCodeRange();
|
| +
|
| + PostalCodeRange.fromJson(core.Map _json) {
|
| + if (_json.containsKey("postalCodeRangeBegin")) {
|
| + postalCodeRangeBegin = _json["postalCodeRangeBegin"];
|
| + }
|
| + if (_json.containsKey("postalCodeRangeEnd")) {
|
| + postalCodeRangeEnd = _json["postalCodeRangeEnd"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (postalCodeRangeBegin != null) {
|
| + _json["postalCodeRangeBegin"] = postalCodeRangeBegin;
|
| + }
|
| + if (postalCodeRangeEnd != null) {
|
| + _json["postalCodeRangeEnd"] = postalCodeRangeEnd;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| class Price {
|
| /** The currency of the price. */
|
| core.String currency;
|
| @@ -9099,315 +9739,671 @@ class Product {
|
| if (condition != null) {
|
| _json["condition"] = condition;
|
| }
|
| - if (contentLanguage != null) {
|
| - _json["contentLanguage"] = contentLanguage;
|
| + if (contentLanguage != null) {
|
| + _json["contentLanguage"] = contentLanguage;
|
| + }
|
| + if (customAttributes != null) {
|
| + _json["customAttributes"] = customAttributes.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (customGroups != null) {
|
| + _json["customGroups"] = customGroups.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (customLabel0 != null) {
|
| + _json["customLabel0"] = customLabel0;
|
| + }
|
| + if (customLabel1 != null) {
|
| + _json["customLabel1"] = customLabel1;
|
| + }
|
| + if (customLabel2 != null) {
|
| + _json["customLabel2"] = customLabel2;
|
| + }
|
| + if (customLabel3 != null) {
|
| + _json["customLabel3"] = customLabel3;
|
| + }
|
| + if (customLabel4 != null) {
|
| + _json["customLabel4"] = customLabel4;
|
| + }
|
| + if (description != null) {
|
| + _json["description"] = description;
|
| + }
|
| + if (destinations != null) {
|
| + _json["destinations"] = destinations.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (displayAdsId != null) {
|
| + _json["displayAdsId"] = displayAdsId;
|
| + }
|
| + if (displayAdsLink != null) {
|
| + _json["displayAdsLink"] = displayAdsLink;
|
| + }
|
| + if (displayAdsSimilarIds != null) {
|
| + _json["displayAdsSimilarIds"] = displayAdsSimilarIds;
|
| + }
|
| + if (displayAdsTitle != null) {
|
| + _json["displayAdsTitle"] = displayAdsTitle;
|
| + }
|
| + if (displayAdsValue != null) {
|
| + _json["displayAdsValue"] = displayAdsValue;
|
| + }
|
| + if (energyEfficiencyClass != null) {
|
| + _json["energyEfficiencyClass"] = energyEfficiencyClass;
|
| + }
|
| + if (expirationDate != null) {
|
| + _json["expirationDate"] = expirationDate;
|
| + }
|
| + if (gender != null) {
|
| + _json["gender"] = gender;
|
| + }
|
| + if (googleProductCategory != null) {
|
| + _json["googleProductCategory"] = googleProductCategory;
|
| + }
|
| + if (gtin != null) {
|
| + _json["gtin"] = gtin;
|
| + }
|
| + if (id != null) {
|
| + _json["id"] = id;
|
| + }
|
| + if (identifierExists != null) {
|
| + _json["identifierExists"] = identifierExists;
|
| + }
|
| + if (imageLink != null) {
|
| + _json["imageLink"] = imageLink;
|
| + }
|
| + if (installment != null) {
|
| + _json["installment"] = (installment).toJson();
|
| + }
|
| + if (isBundle != null) {
|
| + _json["isBundle"] = isBundle;
|
| + }
|
| + if (itemGroupId != null) {
|
| + _json["itemGroupId"] = itemGroupId;
|
| + }
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (link != null) {
|
| + _json["link"] = link;
|
| + }
|
| + if (loyaltyPoints != null) {
|
| + _json["loyaltyPoints"] = (loyaltyPoints).toJson();
|
| + }
|
| + if (material != null) {
|
| + _json["material"] = material;
|
| + }
|
| + if (mobileLink != null) {
|
| + _json["mobileLink"] = mobileLink;
|
| + }
|
| + if (mpn != null) {
|
| + _json["mpn"] = mpn;
|
| + }
|
| + if (multipack != null) {
|
| + _json["multipack"] = multipack;
|
| + }
|
| + if (offerId != null) {
|
| + _json["offerId"] = offerId;
|
| + }
|
| + if (onlineOnly != null) {
|
| + _json["onlineOnly"] = onlineOnly;
|
| + }
|
| + if (pattern != null) {
|
| + _json["pattern"] = pattern;
|
| + }
|
| + if (price != null) {
|
| + _json["price"] = (price).toJson();
|
| + }
|
| + if (productType != null) {
|
| + _json["productType"] = productType;
|
| + }
|
| + if (promotionIds != null) {
|
| + _json["promotionIds"] = promotionIds;
|
| + }
|
| + if (salePrice != null) {
|
| + _json["salePrice"] = (salePrice).toJson();
|
| + }
|
| + if (salePriceEffectiveDate != null) {
|
| + _json["salePriceEffectiveDate"] = salePriceEffectiveDate;
|
| + }
|
| + if (sellOnGoogleQuantity != null) {
|
| + _json["sellOnGoogleQuantity"] = sellOnGoogleQuantity;
|
| + }
|
| + if (shipping != null) {
|
| + _json["shipping"] = shipping.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (shippingHeight != null) {
|
| + _json["shippingHeight"] = (shippingHeight).toJson();
|
| + }
|
| + if (shippingLabel != null) {
|
| + _json["shippingLabel"] = shippingLabel;
|
| + }
|
| + if (shippingLength != null) {
|
| + _json["shippingLength"] = (shippingLength).toJson();
|
| + }
|
| + if (shippingWeight != null) {
|
| + _json["shippingWeight"] = (shippingWeight).toJson();
|
| + }
|
| + if (shippingWidth != null) {
|
| + _json["shippingWidth"] = (shippingWidth).toJson();
|
| + }
|
| + if (sizeSystem != null) {
|
| + _json["sizeSystem"] = sizeSystem;
|
| + }
|
| + if (sizeType != null) {
|
| + _json["sizeType"] = sizeType;
|
| + }
|
| + if (sizes != null) {
|
| + _json["sizes"] = sizes;
|
| + }
|
| + if (targetCountry != null) {
|
| + _json["targetCountry"] = targetCountry;
|
| + }
|
| + if (taxes != null) {
|
| + _json["taxes"] = taxes.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (title != null) {
|
| + _json["title"] = title;
|
| + }
|
| + if (unitPricingBaseMeasure != null) {
|
| + _json["unitPricingBaseMeasure"] = (unitPricingBaseMeasure).toJson();
|
| + }
|
| + if (unitPricingMeasure != null) {
|
| + _json["unitPricingMeasure"] = (unitPricingMeasure).toJson();
|
| + }
|
| + if (validatedDestinations != null) {
|
| + _json["validatedDestinations"] = validatedDestinations;
|
| + }
|
| + if (warnings != null) {
|
| + _json["warnings"] = warnings.map((value) => (value).toJson()).toList();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductAspect {
|
| + /** The name of the aspect. */
|
| + core.String aspectName;
|
| + /** The name of the destination. Leave out to apply to all destinations. */
|
| + core.String destinationName;
|
| + /** Whether the aspect is required, excluded or should be validated. */
|
| + core.String intention;
|
| +
|
| + ProductAspect();
|
| +
|
| + ProductAspect.fromJson(core.Map _json) {
|
| + if (_json.containsKey("aspectName")) {
|
| + aspectName = _json["aspectName"];
|
| + }
|
| + if (_json.containsKey("destinationName")) {
|
| + destinationName = _json["destinationName"];
|
| + }
|
| + if (_json.containsKey("intention")) {
|
| + intention = _json["intention"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (aspectName != null) {
|
| + _json["aspectName"] = aspectName;
|
| + }
|
| + if (destinationName != null) {
|
| + _json["destinationName"] = destinationName;
|
| }
|
| - if (customAttributes != null) {
|
| - _json["customAttributes"] = customAttributes.map((value) => (value).toJson()).toList();
|
| + if (intention != null) {
|
| + _json["intention"] = intention;
|
| }
|
| - if (customGroups != null) {
|
| - _json["customGroups"] = customGroups.map((value) => (value).toJson()).toList();
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductCustomAttribute {
|
| + /**
|
| + * The name of the attribute. Underscores will be replaced by spaces upon
|
| + * insertion.
|
| + */
|
| + core.String name;
|
| + /** The type of the attribute. */
|
| + core.String type;
|
| + /**
|
| + * Free-form unit of the attribute. Unit can only be used for values of type
|
| + * INT or FLOAT.
|
| + */
|
| + core.String unit;
|
| + /** The value of the attribute. */
|
| + core.String value;
|
| +
|
| + ProductCustomAttribute();
|
| +
|
| + ProductCustomAttribute.fromJson(core.Map _json) {
|
| + if (_json.containsKey("name")) {
|
| + name = _json["name"];
|
| }
|
| - if (customLabel0 != null) {
|
| - _json["customLabel0"] = customLabel0;
|
| + if (_json.containsKey("type")) {
|
| + type = _json["type"];
|
| }
|
| - if (customLabel1 != null) {
|
| - _json["customLabel1"] = customLabel1;
|
| + if (_json.containsKey("unit")) {
|
| + unit = _json["unit"];
|
| }
|
| - if (customLabel2 != null) {
|
| - _json["customLabel2"] = customLabel2;
|
| + if (_json.containsKey("value")) {
|
| + value = _json["value"];
|
| }
|
| - if (customLabel3 != null) {
|
| - _json["customLabel3"] = customLabel3;
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (name != null) {
|
| + _json["name"] = name;
|
| }
|
| - if (customLabel4 != null) {
|
| - _json["customLabel4"] = customLabel4;
|
| + if (type != null) {
|
| + _json["type"] = type;
|
| }
|
| - if (description != null) {
|
| - _json["description"] = description;
|
| + if (unit != null) {
|
| + _json["unit"] = unit;
|
| }
|
| - if (destinations != null) {
|
| - _json["destinations"] = destinations.map((value) => (value).toJson()).toList();
|
| + if (value != null) {
|
| + _json["value"] = value;
|
| }
|
| - if (displayAdsId != null) {
|
| - _json["displayAdsId"] = displayAdsId;
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductCustomGroup {
|
| + /** The sub-attributes. */
|
| + core.List<ProductCustomAttribute> attributes;
|
| + /**
|
| + * The name of the group. Underscores will be replaced by spaces upon
|
| + * insertion.
|
| + */
|
| + core.String name;
|
| +
|
| + ProductCustomGroup();
|
| +
|
| + ProductCustomGroup.fromJson(core.Map _json) {
|
| + if (_json.containsKey("attributes")) {
|
| + attributes = _json["attributes"].map((value) => new ProductCustomAttribute.fromJson(value)).toList();
|
| }
|
| - if (displayAdsLink != null) {
|
| - _json["displayAdsLink"] = displayAdsLink;
|
| + if (_json.containsKey("name")) {
|
| + name = _json["name"];
|
| }
|
| - if (displayAdsSimilarIds != null) {
|
| - _json["displayAdsSimilarIds"] = displayAdsSimilarIds;
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (attributes != null) {
|
| + _json["attributes"] = attributes.map((value) => (value).toJson()).toList();
|
| }
|
| - if (displayAdsTitle != null) {
|
| - _json["displayAdsTitle"] = displayAdsTitle;
|
| + if (name != null) {
|
| + _json["name"] = name;
|
| }
|
| - if (displayAdsValue != null) {
|
| - _json["displayAdsValue"] = displayAdsValue;
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductDestination {
|
| + /** The name of the destination. */
|
| + core.String destinationName;
|
| + /** Whether the destination is required, excluded or should be validated. */
|
| + core.String intention;
|
| +
|
| + ProductDestination();
|
| +
|
| + ProductDestination.fromJson(core.Map _json) {
|
| + if (_json.containsKey("destinationName")) {
|
| + destinationName = _json["destinationName"];
|
| }
|
| - if (energyEfficiencyClass != null) {
|
| - _json["energyEfficiencyClass"] = energyEfficiencyClass;
|
| + if (_json.containsKey("intention")) {
|
| + intention = _json["intention"];
|
| }
|
| - if (expirationDate != null) {
|
| - _json["expirationDate"] = expirationDate;
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (destinationName != null) {
|
| + _json["destinationName"] = destinationName;
|
| }
|
| - if (gender != null) {
|
| - _json["gender"] = gender;
|
| + if (intention != null) {
|
| + _json["intention"] = intention;
|
| }
|
| - if (googleProductCategory != null) {
|
| - _json["googleProductCategory"] = googleProductCategory;
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductShipping {
|
| + /** The CLDR territory code of the country to which an item will ship. */
|
| + core.String country;
|
| + /**
|
| + * The location where the shipping is applicable, represented by a location
|
| + * group name.
|
| + */
|
| + core.String locationGroupName;
|
| + /**
|
| + * The numeric id of a location that the shipping rate applies to as defined
|
| + * in the AdWords API.
|
| + */
|
| + core.String locationId;
|
| + /**
|
| + * The postal code range that the shipping rate applies to, represented by a
|
| + * postal code, a postal code prefix followed by a * wildcard, a range between
|
| + * two postal codes or two postal code prefixes of equal length.
|
| + */
|
| + core.String postalCode;
|
| + /** Fixed shipping price, represented as a number. */
|
| + Price price;
|
| + /**
|
| + * The geographic region to which a shipping rate applies (e.g. zip code).
|
| + */
|
| + core.String region;
|
| + /** A free-form description of the service class or delivery speed. */
|
| + core.String service;
|
| +
|
| + ProductShipping();
|
| +
|
| + ProductShipping.fromJson(core.Map _json) {
|
| + if (_json.containsKey("country")) {
|
| + country = _json["country"];
|
| }
|
| - if (gtin != null) {
|
| - _json["gtin"] = gtin;
|
| + if (_json.containsKey("locationGroupName")) {
|
| + locationGroupName = _json["locationGroupName"];
|
| }
|
| - if (id != null) {
|
| - _json["id"] = id;
|
| + if (_json.containsKey("locationId")) {
|
| + locationId = _json["locationId"];
|
| }
|
| - if (identifierExists != null) {
|
| - _json["identifierExists"] = identifierExists;
|
| + if (_json.containsKey("postalCode")) {
|
| + postalCode = _json["postalCode"];
|
| }
|
| - if (imageLink != null) {
|
| - _json["imageLink"] = imageLink;
|
| + if (_json.containsKey("price")) {
|
| + price = new Price.fromJson(_json["price"]);
|
| }
|
| - if (installment != null) {
|
| - _json["installment"] = (installment).toJson();
|
| + if (_json.containsKey("region")) {
|
| + region = _json["region"];
|
| }
|
| - if (isBundle != null) {
|
| - _json["isBundle"] = isBundle;
|
| + if (_json.containsKey("service")) {
|
| + service = _json["service"];
|
| }
|
| - if (itemGroupId != null) {
|
| - _json["itemGroupId"] = itemGroupId;
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (country != null) {
|
| + _json["country"] = country;
|
| }
|
| - if (kind != null) {
|
| - _json["kind"] = kind;
|
| + if (locationGroupName != null) {
|
| + _json["locationGroupName"] = locationGroupName;
|
| }
|
| - if (link != null) {
|
| - _json["link"] = link;
|
| + if (locationId != null) {
|
| + _json["locationId"] = locationId;
|
| }
|
| - if (loyaltyPoints != null) {
|
| - _json["loyaltyPoints"] = (loyaltyPoints).toJson();
|
| + if (postalCode != null) {
|
| + _json["postalCode"] = postalCode;
|
| }
|
| - if (material != null) {
|
| - _json["material"] = material;
|
| + if (price != null) {
|
| + _json["price"] = (price).toJson();
|
| }
|
| - if (mobileLink != null) {
|
| - _json["mobileLink"] = mobileLink;
|
| + if (region != null) {
|
| + _json["region"] = region;
|
| }
|
| - if (mpn != null) {
|
| - _json["mpn"] = mpn;
|
| + if (service != null) {
|
| + _json["service"] = service;
|
| }
|
| - if (multipack != null) {
|
| - _json["multipack"] = multipack;
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductShippingDimension {
|
| + /**
|
| + * The unit of value.
|
| + *
|
| + * Acceptable values are:
|
| + * - "cm"
|
| + * - "in"
|
| + */
|
| + core.String unit;
|
| + /**
|
| + * The dimension of the product used to calculate the shipping cost of the
|
| + * item.
|
| + */
|
| + core.double value;
|
| +
|
| + ProductShippingDimension();
|
| +
|
| + ProductShippingDimension.fromJson(core.Map _json) {
|
| + if (_json.containsKey("unit")) {
|
| + unit = _json["unit"];
|
| }
|
| - if (offerId != null) {
|
| - _json["offerId"] = offerId;
|
| + if (_json.containsKey("value")) {
|
| + value = _json["value"];
|
| }
|
| - if (onlineOnly != null) {
|
| - _json["onlineOnly"] = onlineOnly;
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (unit != null) {
|
| + _json["unit"] = unit;
|
| }
|
| - if (pattern != null) {
|
| - _json["pattern"] = pattern;
|
| + if (value != null) {
|
| + _json["value"] = value;
|
| }
|
| - if (price != null) {
|
| - _json["price"] = (price).toJson();
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductShippingWeight {
|
| + /** The unit of value. */
|
| + core.String unit;
|
| + /**
|
| + * The weight of the product used to calculate the shipping cost of the item.
|
| + */
|
| + core.double value;
|
| +
|
| + ProductShippingWeight();
|
| +
|
| + ProductShippingWeight.fromJson(core.Map _json) {
|
| + if (_json.containsKey("unit")) {
|
| + unit = _json["unit"];
|
| }
|
| - if (productType != null) {
|
| - _json["productType"] = productType;
|
| + if (_json.containsKey("value")) {
|
| + value = _json["value"];
|
| }
|
| - if (promotionIds != null) {
|
| - _json["promotionIds"] = promotionIds;
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (unit != null) {
|
| + _json["unit"] = unit;
|
| }
|
| - if (salePrice != null) {
|
| - _json["salePrice"] = (salePrice).toJson();
|
| + if (value != null) {
|
| + _json["value"] = value;
|
| }
|
| - if (salePriceEffectiveDate != null) {
|
| - _json["salePriceEffectiveDate"] = salePriceEffectiveDate;
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * The status of a product, i.e., information about a product computed
|
| + * asynchronously by the data quality analysis.
|
| + */
|
| +class ProductStatus {
|
| + /** Date on which the item has been created, in ISO 8601 format. */
|
| + core.String creationDate;
|
| + /** A list of data quality issues associated with the product. */
|
| + core.List<ProductStatusDataQualityIssue> dataQualityIssues;
|
| + /** The intended destinations for the product. */
|
| + core.List<ProductStatusDestinationStatus> destinationStatuses;
|
| + /** Date on which the item expires in Google Shopping, in ISO 8601 format. */
|
| + core.String googleExpirationDate;
|
| + /**
|
| + * Identifies what kind of resource this is. Value: the fixed string
|
| + * "content#productStatus".
|
| + */
|
| + core.String kind;
|
| + /** Date on which the item has been last updated, in ISO 8601 format. */
|
| + core.String lastUpdateDate;
|
| + /** The link to the product. */
|
| + core.String link;
|
| + /** The id of the product for which status is reported. */
|
| + core.String productId;
|
| + /** The title of the product. */
|
| + core.String title;
|
| +
|
| + ProductStatus();
|
| +
|
| + ProductStatus.fromJson(core.Map _json) {
|
| + if (_json.containsKey("creationDate")) {
|
| + creationDate = _json["creationDate"];
|
| }
|
| - if (sellOnGoogleQuantity != null) {
|
| - _json["sellOnGoogleQuantity"] = sellOnGoogleQuantity;
|
| + if (_json.containsKey("dataQualityIssues")) {
|
| + dataQualityIssues = _json["dataQualityIssues"].map((value) => new ProductStatusDataQualityIssue.fromJson(value)).toList();
|
| }
|
| - if (shipping != null) {
|
| - _json["shipping"] = shipping.map((value) => (value).toJson()).toList();
|
| + if (_json.containsKey("destinationStatuses")) {
|
| + destinationStatuses = _json["destinationStatuses"].map((value) => new ProductStatusDestinationStatus.fromJson(value)).toList();
|
| }
|
| - if (shippingHeight != null) {
|
| - _json["shippingHeight"] = (shippingHeight).toJson();
|
| + if (_json.containsKey("googleExpirationDate")) {
|
| + googleExpirationDate = _json["googleExpirationDate"];
|
| }
|
| - if (shippingLabel != null) {
|
| - _json["shippingLabel"] = shippingLabel;
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| }
|
| - if (shippingLength != null) {
|
| - _json["shippingLength"] = (shippingLength).toJson();
|
| + if (_json.containsKey("lastUpdateDate")) {
|
| + lastUpdateDate = _json["lastUpdateDate"];
|
| }
|
| - if (shippingWeight != null) {
|
| - _json["shippingWeight"] = (shippingWeight).toJson();
|
| + if (_json.containsKey("link")) {
|
| + link = _json["link"];
|
| }
|
| - if (shippingWidth != null) {
|
| - _json["shippingWidth"] = (shippingWidth).toJson();
|
| + if (_json.containsKey("productId")) {
|
| + productId = _json["productId"];
|
| }
|
| - if (sizeSystem != null) {
|
| - _json["sizeSystem"] = sizeSystem;
|
| + if (_json.containsKey("title")) {
|
| + title = _json["title"];
|
| }
|
| - if (sizeType != null) {
|
| - _json["sizeType"] = sizeType;
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (creationDate != null) {
|
| + _json["creationDate"] = creationDate;
|
| }
|
| - if (sizes != null) {
|
| - _json["sizes"] = sizes;
|
| + if (dataQualityIssues != null) {
|
| + _json["dataQualityIssues"] = dataQualityIssues.map((value) => (value).toJson()).toList();
|
| }
|
| - if (targetCountry != null) {
|
| - _json["targetCountry"] = targetCountry;
|
| + if (destinationStatuses != null) {
|
| + _json["destinationStatuses"] = destinationStatuses.map((value) => (value).toJson()).toList();
|
| }
|
| - if (taxes != null) {
|
| - _json["taxes"] = taxes.map((value) => (value).toJson()).toList();
|
| + if (googleExpirationDate != null) {
|
| + _json["googleExpirationDate"] = googleExpirationDate;
|
| }
|
| - if (title != null) {
|
| - _json["title"] = title;
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| }
|
| - if (unitPricingBaseMeasure != null) {
|
| - _json["unitPricingBaseMeasure"] = (unitPricingBaseMeasure).toJson();
|
| + if (lastUpdateDate != null) {
|
| + _json["lastUpdateDate"] = lastUpdateDate;
|
| }
|
| - if (unitPricingMeasure != null) {
|
| - _json["unitPricingMeasure"] = (unitPricingMeasure).toJson();
|
| + if (link != null) {
|
| + _json["link"] = link;
|
| }
|
| - if (validatedDestinations != null) {
|
| - _json["validatedDestinations"] = validatedDestinations;
|
| + if (productId != null) {
|
| + _json["productId"] = productId;
|
| }
|
| - if (warnings != null) {
|
| - _json["warnings"] = warnings.map((value) => (value).toJson()).toList();
|
| + if (title != null) {
|
| + _json["title"] = title;
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductAspect {
|
| - /** The name of the aspect. */
|
| - core.String aspectName;
|
| - /** The name of the destination. Leave out to apply to all destinations. */
|
| - core.String destinationName;
|
| - /** Whether the aspect is required, excluded or should be validated. */
|
| - core.String intention;
|
| +class ProductStatusDataQualityIssue {
|
| + /** A more detailed error string. */
|
| + core.String detail;
|
| + /** The fetch status for landing_page_errors. */
|
| + core.String fetchStatus;
|
| + /** The id of the data quality issue. */
|
| + core.String id;
|
| + /** The attribute name that is relevant for the issue. */
|
| + core.String location;
|
| + /** The severity of the data quality issue. */
|
| + core.String severity;
|
| + /** The time stamp of the data quality issue. */
|
| + core.String timestamp;
|
| + /** The value of that attribute that was found on the landing page */
|
| + core.String valueOnLandingPage;
|
| + /** The value the attribute had at time of evaluation. */
|
| + core.String valueProvided;
|
|
|
| - ProductAspect();
|
| + ProductStatusDataQualityIssue();
|
|
|
| - ProductAspect.fromJson(core.Map _json) {
|
| - if (_json.containsKey("aspectName")) {
|
| - aspectName = _json["aspectName"];
|
| - }
|
| - if (_json.containsKey("destinationName")) {
|
| - destinationName = _json["destinationName"];
|
| - }
|
| - if (_json.containsKey("intention")) {
|
| - intention = _json["intention"];
|
| + ProductStatusDataQualityIssue.fromJson(core.Map _json) {
|
| + if (_json.containsKey("detail")) {
|
| + detail = _json["detail"];
|
| }
|
| - }
|
| -
|
| - core.Map toJson() {
|
| - var _json = new core.Map();
|
| - if (aspectName != null) {
|
| - _json["aspectName"] = aspectName;
|
| + if (_json.containsKey("fetchStatus")) {
|
| + fetchStatus = _json["fetchStatus"];
|
| }
|
| - if (destinationName != null) {
|
| - _json["destinationName"] = destinationName;
|
| + if (_json.containsKey("id")) {
|
| + id = _json["id"];
|
| }
|
| - if (intention != null) {
|
| - _json["intention"] = intention;
|
| + if (_json.containsKey("location")) {
|
| + location = _json["location"];
|
| }
|
| - return _json;
|
| - }
|
| -}
|
| -
|
| -class ProductCustomAttribute {
|
| - /**
|
| - * The name of the attribute. Underscores will be replaced by spaces upon
|
| - * insertion.
|
| - */
|
| - core.String name;
|
| - /** The type of the attribute. */
|
| - core.String type;
|
| - /**
|
| - * Free-form unit of the attribute. Unit can only be used for values of type
|
| - * INT or FLOAT.
|
| - */
|
| - core.String unit;
|
| - /** The value of the attribute. */
|
| - core.String value;
|
| -
|
| - ProductCustomAttribute();
|
| -
|
| - ProductCustomAttribute.fromJson(core.Map _json) {
|
| - if (_json.containsKey("name")) {
|
| - name = _json["name"];
|
| + if (_json.containsKey("severity")) {
|
| + severity = _json["severity"];
|
| }
|
| - if (_json.containsKey("type")) {
|
| - type = _json["type"];
|
| + if (_json.containsKey("timestamp")) {
|
| + timestamp = _json["timestamp"];
|
| }
|
| - if (_json.containsKey("unit")) {
|
| - unit = _json["unit"];
|
| + if (_json.containsKey("valueOnLandingPage")) {
|
| + valueOnLandingPage = _json["valueOnLandingPage"];
|
| }
|
| - if (_json.containsKey("value")) {
|
| - value = _json["value"];
|
| + if (_json.containsKey("valueProvided")) {
|
| + valueProvided = _json["valueProvided"];
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (name != null) {
|
| - _json["name"] = name;
|
| + if (detail != null) {
|
| + _json["detail"] = detail;
|
| }
|
| - if (type != null) {
|
| - _json["type"] = type;
|
| + if (fetchStatus != null) {
|
| + _json["fetchStatus"] = fetchStatus;
|
| }
|
| - if (unit != null) {
|
| - _json["unit"] = unit;
|
| + if (id != null) {
|
| + _json["id"] = id;
|
| }
|
| - if (value != null) {
|
| - _json["value"] = value;
|
| + if (location != null) {
|
| + _json["location"] = location;
|
| }
|
| - return _json;
|
| - }
|
| -}
|
| -
|
| -class ProductCustomGroup {
|
| - /** The sub-attributes. */
|
| - core.List<ProductCustomAttribute> attributes;
|
| - /**
|
| - * The name of the group. Underscores will be replaced by spaces upon
|
| - * insertion.
|
| - */
|
| - core.String name;
|
| -
|
| - ProductCustomGroup();
|
| -
|
| - ProductCustomGroup.fromJson(core.Map _json) {
|
| - if (_json.containsKey("attributes")) {
|
| - attributes = _json["attributes"].map((value) => new ProductCustomAttribute.fromJson(value)).toList();
|
| + if (severity != null) {
|
| + _json["severity"] = severity;
|
| }
|
| - if (_json.containsKey("name")) {
|
| - name = _json["name"];
|
| + if (timestamp != null) {
|
| + _json["timestamp"] = timestamp;
|
| }
|
| - }
|
| -
|
| - core.Map toJson() {
|
| - var _json = new core.Map();
|
| - if (attributes != null) {
|
| - _json["attributes"] = attributes.map((value) => (value).toJson()).toList();
|
| + if (valueOnLandingPage != null) {
|
| + _json["valueOnLandingPage"] = valueOnLandingPage;
|
| }
|
| - if (name != null) {
|
| - _json["name"] = name;
|
| + if (valueProvided != null) {
|
| + _json["valueProvided"] = valueProvided;
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductDestination {
|
| - /** The name of the destination. */
|
| - core.String destinationName;
|
| - /** Whether the destination is required, excluded or should be validated. */
|
| +class ProductStatusDestinationStatus {
|
| + /** The destination's approval status. */
|
| + core.String approvalStatus;
|
| + /** The name of the destination */
|
| + core.String destination;
|
| + /**
|
| + * Whether the destination is required, excluded, selected by default or
|
| + * should be validated.
|
| + */
|
| core.String intention;
|
|
|
| - ProductDestination();
|
| + ProductStatusDestinationStatus();
|
|
|
| - ProductDestination.fromJson(core.Map _json) {
|
| - if (_json.containsKey("destinationName")) {
|
| - destinationName = _json["destinationName"];
|
| + ProductStatusDestinationStatus.fromJson(core.Map _json) {
|
| + if (_json.containsKey("approvalStatus")) {
|
| + approvalStatus = _json["approvalStatus"];
|
| + }
|
| + if (_json.containsKey("destination")) {
|
| + destination = _json["destination"];
|
| }
|
| if (_json.containsKey("intention")) {
|
| intention = _json["intention"];
|
| @@ -9416,8 +10412,11 @@ class ProductDestination {
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (destinationName != null) {
|
| - _json["destinationName"] = destinationName;
|
| + if (approvalStatus != null) {
|
| + _json["approvalStatus"] = approvalStatus;
|
| + }
|
| + if (destination != null) {
|
| + _json["destination"] = destination;
|
| }
|
| if (intention != null) {
|
| _json["intention"] = intention;
|
| @@ -9426,57 +10425,51 @@ class ProductDestination {
|
| }
|
| }
|
|
|
| -class ProductShipping {
|
| - /** The CLDR territory code of the country to which an item will ship. */
|
| - core.String country;
|
| +class ProductTax {
|
| /**
|
| - * The location where the shipping is applicable, represented by a location
|
| - * group name.
|
| + * The country within which the item is taxed, specified as a CLDR territory
|
| + * code.
|
| */
|
| - core.String locationGroupName;
|
| + core.String country;
|
| /**
|
| - * The numeric id of a location that the shipping rate applies to as defined
|
| - * in the AdWords API.
|
| + * The numeric id of a location that the tax rate applies to as defined in the
|
| + * AdWords API.
|
| */
|
| core.String locationId;
|
| /**
|
| - * The postal code range that the shipping rate applies to, represented by a
|
| - * postal code, a postal code prefix followed by a * wildcard, a range between
|
| - * two postal codes or two postal code prefixes of equal length.
|
| + * The postal code range that the tax rate applies to, represented by a ZIP
|
| + * code, a ZIP code prefix using * wildcard, a range between two ZIP codes or
|
| + * two ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460,
|
| + * 94*-95*.
|
| */
|
| core.String postalCode;
|
| - /** Fixed shipping price, represented as a number. */
|
| - Price price;
|
| - /**
|
| - * The geographic region to which a shipping rate applies (e.g. zip code).
|
| - */
|
| + /** The percentage of tax rate that applies to the item price. */
|
| + core.double rate;
|
| + /** The geographic region to which the tax rate applies. */
|
| core.String region;
|
| - /** A free-form description of the service class or delivery speed. */
|
| - core.String service;
|
| + /** Set to true if tax is charged on shipping. */
|
| + core.bool taxShip;
|
|
|
| - ProductShipping();
|
| + ProductTax();
|
|
|
| - ProductShipping.fromJson(core.Map _json) {
|
| + ProductTax.fromJson(core.Map _json) {
|
| if (_json.containsKey("country")) {
|
| country = _json["country"];
|
| }
|
| - if (_json.containsKey("locationGroupName")) {
|
| - locationGroupName = _json["locationGroupName"];
|
| - }
|
| if (_json.containsKey("locationId")) {
|
| locationId = _json["locationId"];
|
| }
|
| if (_json.containsKey("postalCode")) {
|
| postalCode = _json["postalCode"];
|
| }
|
| - if (_json.containsKey("price")) {
|
| - price = new Price.fromJson(_json["price"]);
|
| + if (_json.containsKey("rate")) {
|
| + rate = _json["rate"];
|
| }
|
| if (_json.containsKey("region")) {
|
| region = _json["region"];
|
| }
|
| - if (_json.containsKey("service")) {
|
| - service = _json["service"];
|
| + if (_json.containsKey("taxShip")) {
|
| + taxShip = _json["taxShip"];
|
| }
|
| }
|
|
|
| @@ -9485,645 +10478,697 @@ class ProductShipping {
|
| if (country != null) {
|
| _json["country"] = country;
|
| }
|
| - if (locationGroupName != null) {
|
| - _json["locationGroupName"] = locationGroupName;
|
| - }
|
| if (locationId != null) {
|
| _json["locationId"] = locationId;
|
| }
|
| if (postalCode != null) {
|
| _json["postalCode"] = postalCode;
|
| }
|
| - if (price != null) {
|
| - _json["price"] = (price).toJson();
|
| + if (rate != null) {
|
| + _json["rate"] = rate;
|
| }
|
| if (region != null) {
|
| _json["region"] = region;
|
| }
|
| - if (service != null) {
|
| - _json["service"] = service;
|
| + if (taxShip != null) {
|
| + _json["taxShip"] = taxShip;
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductShippingDimension {
|
| - /**
|
| - * The unit of value.
|
| - *
|
| - * Acceptable values are:
|
| - * - "cm"
|
| - * - "in"
|
| - */
|
| +class ProductUnitPricingBaseMeasure {
|
| + /** The unit of the denominator. */
|
| core.String unit;
|
| - /**
|
| - * The dimension of the product used to calculate the shipping cost of the
|
| - * item.
|
| - */
|
| + /** The denominator of the unit price. */
|
| + core.String value;
|
| +
|
| + ProductUnitPricingBaseMeasure();
|
| +
|
| + ProductUnitPricingBaseMeasure.fromJson(core.Map _json) {
|
| + if (_json.containsKey("unit")) {
|
| + unit = _json["unit"];
|
| + }
|
| + if (_json.containsKey("value")) {
|
| + value = _json["value"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (unit != null) {
|
| + _json["unit"] = unit;
|
| + }
|
| + if (value != null) {
|
| + _json["value"] = value;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductUnitPricingMeasure {
|
| + /** The unit of the measure. */
|
| + core.String unit;
|
| + /** The measure of an item. */
|
| core.double value;
|
|
|
| - ProductShippingDimension();
|
| + ProductUnitPricingMeasure();
|
|
|
| - ProductShippingDimension.fromJson(core.Map _json) {
|
| + ProductUnitPricingMeasure.fromJson(core.Map _json) {
|
| if (_json.containsKey("unit")) {
|
| unit = _json["unit"];
|
| }
|
| - if (_json.containsKey("value")) {
|
| - value = _json["value"];
|
| + if (_json.containsKey("value")) {
|
| + value = _json["value"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (unit != null) {
|
| + _json["unit"] = unit;
|
| + }
|
| + if (value != null) {
|
| + _json["value"] = value;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ProductsCustomBatchRequest {
|
| + /** The request entries to be processed in the batch. */
|
| + core.List<ProductsCustomBatchRequestEntry> entries;
|
| +
|
| + ProductsCustomBatchRequest();
|
| +
|
| + ProductsCustomBatchRequest.fromJson(core.Map _json) {
|
| + if (_json.containsKey("entries")) {
|
| + entries = _json["entries"].map((value) => new ProductsCustomBatchRequestEntry.fromJson(value)).toList();
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (entries != null) {
|
| + _json["entries"] = entries.map((value) => (value).toJson()).toList();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +/** A batch entry encoding a single non-batch products request. */
|
| +class ProductsCustomBatchRequestEntry {
|
| + /** An entry ID, unique within the batch request. */
|
| + core.int batchId;
|
| + /** The ID of the managing account. */
|
| + core.String merchantId;
|
| + core.String method;
|
| + /** The product to insert. Only required if the method is insert. */
|
| + Product product;
|
| + /**
|
| + * The ID of the product to get or delete. Only defined if the method is get
|
| + * or delete.
|
| + */
|
| + core.String productId;
|
| +
|
| + ProductsCustomBatchRequestEntry();
|
| +
|
| + ProductsCustomBatchRequestEntry.fromJson(core.Map _json) {
|
| + if (_json.containsKey("batchId")) {
|
| + batchId = _json["batchId"];
|
| + }
|
| + if (_json.containsKey("merchantId")) {
|
| + merchantId = _json["merchantId"];
|
| + }
|
| + if (_json.containsKey("method")) {
|
| + method = _json["method"];
|
| + }
|
| + if (_json.containsKey("product")) {
|
| + product = new Product.fromJson(_json["product"]);
|
| + }
|
| + if (_json.containsKey("productId")) {
|
| + productId = _json["productId"];
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (unit != null) {
|
| - _json["unit"] = unit;
|
| + if (batchId != null) {
|
| + _json["batchId"] = batchId;
|
| }
|
| - if (value != null) {
|
| - _json["value"] = value;
|
| + if (merchantId != null) {
|
| + _json["merchantId"] = merchantId;
|
| + }
|
| + if (method != null) {
|
| + _json["method"] = method;
|
| + }
|
| + if (product != null) {
|
| + _json["product"] = (product).toJson();
|
| + }
|
| + if (productId != null) {
|
| + _json["productId"] = productId;
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductShippingWeight {
|
| - /** The unit of value. */
|
| - core.String unit;
|
| +class ProductsCustomBatchResponse {
|
| + /** The result of the execution of the batch requests. */
|
| + core.List<ProductsCustomBatchResponseEntry> entries;
|
| /**
|
| - * The weight of the product used to calculate the shipping cost of the item.
|
| + * Identifies what kind of resource this is. Value: the fixed string
|
| + * "content#productsCustomBatchResponse".
|
| */
|
| - core.double value;
|
| + core.String kind;
|
|
|
| - ProductShippingWeight();
|
| + ProductsCustomBatchResponse();
|
|
|
| - ProductShippingWeight.fromJson(core.Map _json) {
|
| - if (_json.containsKey("unit")) {
|
| - unit = _json["unit"];
|
| + ProductsCustomBatchResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("entries")) {
|
| + entries = _json["entries"].map((value) => new ProductsCustomBatchResponseEntry.fromJson(value)).toList();
|
| }
|
| - if (_json.containsKey("value")) {
|
| - value = _json["value"];
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (unit != null) {
|
| - _json["unit"] = unit;
|
| + if (entries != null) {
|
| + _json["entries"] = entries.map((value) => (value).toJson()).toList();
|
| }
|
| - if (value != null) {
|
| - _json["value"] = value;
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -/**
|
| - * The status of a product, i.e., information about a product computed
|
| - * asynchronously by the data quality analysis.
|
| - */
|
| -class ProductStatus {
|
| - /** Date on which the item has been created, in ISO 8601 format. */
|
| - core.String creationDate;
|
| - /** A list of data quality issues associated with the product. */
|
| - core.List<ProductStatusDataQualityIssue> dataQualityIssues;
|
| - /** The intended destinations for the product. */
|
| - core.List<ProductStatusDestinationStatus> destinationStatuses;
|
| - /** Date on which the item expires in Google Shopping, in ISO 8601 format. */
|
| - core.String googleExpirationDate;
|
| +/** A batch entry encoding a single non-batch products response. */
|
| +class ProductsCustomBatchResponseEntry {
|
| + /** The ID of the request entry this entry responds to. */
|
| + core.int batchId;
|
| + /** A list of errors defined if and only if the request failed. */
|
| + Errors errors;
|
| /**
|
| * Identifies what kind of resource this is. Value: the fixed string
|
| - * "content#productStatus".
|
| + * "content#productsCustomBatchResponseEntry".
|
| */
|
| core.String kind;
|
| - /** Date on which the item has been last updated, in ISO 8601 format. */
|
| - core.String lastUpdateDate;
|
| - /** The link to the product. */
|
| - core.String link;
|
| - /** The id of the product for which status is reported. */
|
| - core.String productId;
|
| - /** The title of the product. */
|
| - core.String title;
|
| + /**
|
| + * The inserted product. Only defined if the method is insert and if the
|
| + * request was successful.
|
| + */
|
| + Product product;
|
|
|
| - ProductStatus();
|
| + ProductsCustomBatchResponseEntry();
|
|
|
| - ProductStatus.fromJson(core.Map _json) {
|
| - if (_json.containsKey("creationDate")) {
|
| - creationDate = _json["creationDate"];
|
| - }
|
| - if (_json.containsKey("dataQualityIssues")) {
|
| - dataQualityIssues = _json["dataQualityIssues"].map((value) => new ProductStatusDataQualityIssue.fromJson(value)).toList();
|
| - }
|
| - if (_json.containsKey("destinationStatuses")) {
|
| - destinationStatuses = _json["destinationStatuses"].map((value) => new ProductStatusDestinationStatus.fromJson(value)).toList();
|
| + ProductsCustomBatchResponseEntry.fromJson(core.Map _json) {
|
| + if (_json.containsKey("batchId")) {
|
| + batchId = _json["batchId"];
|
| }
|
| - if (_json.containsKey("googleExpirationDate")) {
|
| - googleExpirationDate = _json["googleExpirationDate"];
|
| + if (_json.containsKey("errors")) {
|
| + errors = new Errors.fromJson(_json["errors"]);
|
| }
|
| if (_json.containsKey("kind")) {
|
| kind = _json["kind"];
|
| }
|
| - if (_json.containsKey("lastUpdateDate")) {
|
| - lastUpdateDate = _json["lastUpdateDate"];
|
| - }
|
| - if (_json.containsKey("link")) {
|
| - link = _json["link"];
|
| - }
|
| - if (_json.containsKey("productId")) {
|
| - productId = _json["productId"];
|
| - }
|
| - if (_json.containsKey("title")) {
|
| - title = _json["title"];
|
| + if (_json.containsKey("product")) {
|
| + product = new Product.fromJson(_json["product"]);
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (creationDate != null) {
|
| - _json["creationDate"] = creationDate;
|
| - }
|
| - if (dataQualityIssues != null) {
|
| - _json["dataQualityIssues"] = dataQualityIssues.map((value) => (value).toJson()).toList();
|
| - }
|
| - if (destinationStatuses != null) {
|
| - _json["destinationStatuses"] = destinationStatuses.map((value) => (value).toJson()).toList();
|
| + if (batchId != null) {
|
| + _json["batchId"] = batchId;
|
| }
|
| - if (googleExpirationDate != null) {
|
| - _json["googleExpirationDate"] = googleExpirationDate;
|
| + if (errors != null) {
|
| + _json["errors"] = (errors).toJson();
|
| }
|
| if (kind != null) {
|
| _json["kind"] = kind;
|
| }
|
| - if (lastUpdateDate != null) {
|
| - _json["lastUpdateDate"] = lastUpdateDate;
|
| - }
|
| - if (link != null) {
|
| - _json["link"] = link;
|
| - }
|
| - if (productId != null) {
|
| - _json["productId"] = productId;
|
| - }
|
| - if (title != null) {
|
| - _json["title"] = title;
|
| + if (product != null) {
|
| + _json["product"] = (product).toJson();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductStatusDataQualityIssue {
|
| - /** A more detailed error string. */
|
| - core.String detail;
|
| - /** The fetch status for landing_page_errors. */
|
| - core.String fetchStatus;
|
| - /** The id of the data quality issue. */
|
| - core.String id;
|
| - /** The attribute name that is relevant for the issue. */
|
| - core.String location;
|
| - /** The severity of the data quality issue. */
|
| - core.String severity;
|
| - /** The time stamp of the data quality issue. */
|
| - core.String timestamp;
|
| - /** The value of that attribute that was found on the landing page */
|
| - core.String valueOnLandingPage;
|
| - /** The value the attribute had at time of evaluation. */
|
| - core.String valueProvided;
|
| +class ProductsListResponse {
|
| + /**
|
| + * Identifies what kind of resource this is. Value: the fixed string
|
| + * "content#productsListResponse".
|
| + */
|
| + core.String kind;
|
| + /** The token for the retrieval of the next page of products. */
|
| + core.String nextPageToken;
|
| + core.List<Product> resources;
|
|
|
| - ProductStatusDataQualityIssue();
|
| + ProductsListResponse();
|
|
|
| - ProductStatusDataQualityIssue.fromJson(core.Map _json) {
|
| - if (_json.containsKey("detail")) {
|
| - detail = _json["detail"];
|
| - }
|
| - if (_json.containsKey("fetchStatus")) {
|
| - fetchStatus = _json["fetchStatus"];
|
| - }
|
| - if (_json.containsKey("id")) {
|
| - id = _json["id"];
|
| - }
|
| - if (_json.containsKey("location")) {
|
| - location = _json["location"];
|
| - }
|
| - if (_json.containsKey("severity")) {
|
| - severity = _json["severity"];
|
| - }
|
| - if (_json.containsKey("timestamp")) {
|
| - timestamp = _json["timestamp"];
|
| + ProductsListResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| }
|
| - if (_json.containsKey("valueOnLandingPage")) {
|
| - valueOnLandingPage = _json["valueOnLandingPage"];
|
| + if (_json.containsKey("nextPageToken")) {
|
| + nextPageToken = _json["nextPageToken"];
|
| }
|
| - if (_json.containsKey("valueProvided")) {
|
| - valueProvided = _json["valueProvided"];
|
| + if (_json.containsKey("resources")) {
|
| + resources = _json["resources"].map((value) => new Product.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (detail != null) {
|
| - _json["detail"] = detail;
|
| - }
|
| - if (fetchStatus != null) {
|
| - _json["fetchStatus"] = fetchStatus;
|
| - }
|
| - if (id != null) {
|
| - _json["id"] = id;
|
| - }
|
| - if (location != null) {
|
| - _json["location"] = location;
|
| - }
|
| - if (severity != null) {
|
| - _json["severity"] = severity;
|
| - }
|
| - if (timestamp != null) {
|
| - _json["timestamp"] = timestamp;
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| }
|
| - if (valueOnLandingPage != null) {
|
| - _json["valueOnLandingPage"] = valueOnLandingPage;
|
| + if (nextPageToken != null) {
|
| + _json["nextPageToken"] = nextPageToken;
|
| }
|
| - if (valueProvided != null) {
|
| - _json["valueProvided"] = valueProvided;
|
| + if (resources != null) {
|
| + _json["resources"] = resources.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductStatusDestinationStatus {
|
| - /** The destination's approval status. */
|
| - core.String approvalStatus;
|
| - /** The name of the destination */
|
| - core.String destination;
|
| - /**
|
| - * Whether the destination is required, excluded, selected by default or
|
| - * should be validated.
|
| - */
|
| - core.String intention;
|
| -
|
| - ProductStatusDestinationStatus();
|
| -
|
| - ProductStatusDestinationStatus.fromJson(core.Map _json) {
|
| - if (_json.containsKey("approvalStatus")) {
|
| - approvalStatus = _json["approvalStatus"];
|
| - }
|
| - if (_json.containsKey("destination")) {
|
| - destination = _json["destination"];
|
| - }
|
| - if (_json.containsKey("intention")) {
|
| - intention = _json["intention"];
|
| +class ProductstatusesCustomBatchRequest {
|
| + /** The request entries to be processed in the batch. */
|
| + core.List<ProductstatusesCustomBatchRequestEntry> entries;
|
| +
|
| + ProductstatusesCustomBatchRequest();
|
| +
|
| + ProductstatusesCustomBatchRequest.fromJson(core.Map _json) {
|
| + if (_json.containsKey("entries")) {
|
| + entries = _json["entries"].map((value) => new ProductstatusesCustomBatchRequestEntry.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (approvalStatus != null) {
|
| - _json["approvalStatus"] = approvalStatus;
|
| - }
|
| - if (destination != null) {
|
| - _json["destination"] = destination;
|
| - }
|
| - if (intention != null) {
|
| - _json["intention"] = intention;
|
| + if (entries != null) {
|
| + _json["entries"] = entries.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductTax {
|
| - /**
|
| - * The country within which the item is taxed, specified as a CLDR territory
|
| - * code.
|
| - */
|
| - core.String country;
|
| - /**
|
| - * The numeric id of a location that the tax rate applies to as defined in the
|
| - * AdWords API.
|
| - */
|
| - core.String locationId;
|
| - /**
|
| - * The postal code range that the tax rate applies to, represented by a ZIP
|
| - * code, a ZIP code prefix using * wildcard, a range between two ZIP codes or
|
| - * two ZIP code prefixes of equal length. Examples: 94114, 94*, 94002-95460,
|
| - * 94*-95*.
|
| - */
|
| - core.String postalCode;
|
| - /** The percentage of tax rate that applies to the item price. */
|
| - core.double rate;
|
| - /** The geographic region to which the tax rate applies. */
|
| - core.String region;
|
| - /** Set to true if tax is charged on shipping. */
|
| - core.bool taxShip;
|
| +/** A batch entry encoding a single non-batch productstatuses request. */
|
| +class ProductstatusesCustomBatchRequestEntry {
|
| + /** An entry ID, unique within the batch request. */
|
| + core.int batchId;
|
| + /** The ID of the managing account. */
|
| + core.String merchantId;
|
| + core.String method;
|
| + /** The ID of the product whose status to get. */
|
| + core.String productId;
|
|
|
| - ProductTax();
|
| + ProductstatusesCustomBatchRequestEntry();
|
|
|
| - ProductTax.fromJson(core.Map _json) {
|
| - if (_json.containsKey("country")) {
|
| - country = _json["country"];
|
| - }
|
| - if (_json.containsKey("locationId")) {
|
| - locationId = _json["locationId"];
|
| - }
|
| - if (_json.containsKey("postalCode")) {
|
| - postalCode = _json["postalCode"];
|
| + ProductstatusesCustomBatchRequestEntry.fromJson(core.Map _json) {
|
| + if (_json.containsKey("batchId")) {
|
| + batchId = _json["batchId"];
|
| }
|
| - if (_json.containsKey("rate")) {
|
| - rate = _json["rate"];
|
| + if (_json.containsKey("merchantId")) {
|
| + merchantId = _json["merchantId"];
|
| }
|
| - if (_json.containsKey("region")) {
|
| - region = _json["region"];
|
| + if (_json.containsKey("method")) {
|
| + method = _json["method"];
|
| }
|
| - if (_json.containsKey("taxShip")) {
|
| - taxShip = _json["taxShip"];
|
| + if (_json.containsKey("productId")) {
|
| + productId = _json["productId"];
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (country != null) {
|
| - _json["country"] = country;
|
| - }
|
| - if (locationId != null) {
|
| - _json["locationId"] = locationId;
|
| - }
|
| - if (postalCode != null) {
|
| - _json["postalCode"] = postalCode;
|
| + if (batchId != null) {
|
| + _json["batchId"] = batchId;
|
| }
|
| - if (rate != null) {
|
| - _json["rate"] = rate;
|
| + if (merchantId != null) {
|
| + _json["merchantId"] = merchantId;
|
| }
|
| - if (region != null) {
|
| - _json["region"] = region;
|
| + if (method != null) {
|
| + _json["method"] = method;
|
| }
|
| - if (taxShip != null) {
|
| - _json["taxShip"] = taxShip;
|
| + if (productId != null) {
|
| + _json["productId"] = productId;
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductUnitPricingBaseMeasure {
|
| - /** The unit of the denominator. */
|
| - core.String unit;
|
| - /** The denominator of the unit price. */
|
| - core.String value;
|
| +class ProductstatusesCustomBatchResponse {
|
| + /** The result of the execution of the batch requests. */
|
| + core.List<ProductstatusesCustomBatchResponseEntry> entries;
|
| + /**
|
| + * Identifies what kind of resource this is. Value: the fixed string
|
| + * "content#productstatusesCustomBatchResponse".
|
| + */
|
| + core.String kind;
|
|
|
| - ProductUnitPricingBaseMeasure();
|
| + ProductstatusesCustomBatchResponse();
|
|
|
| - ProductUnitPricingBaseMeasure.fromJson(core.Map _json) {
|
| - if (_json.containsKey("unit")) {
|
| - unit = _json["unit"];
|
| + ProductstatusesCustomBatchResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("entries")) {
|
| + entries = _json["entries"].map((value) => new ProductstatusesCustomBatchResponseEntry.fromJson(value)).toList();
|
| }
|
| - if (_json.containsKey("value")) {
|
| - value = _json["value"];
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (unit != null) {
|
| - _json["unit"] = unit;
|
| + if (entries != null) {
|
| + _json["entries"] = entries.map((value) => (value).toJson()).toList();
|
| }
|
| - if (value != null) {
|
| - _json["value"] = value;
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductUnitPricingMeasure {
|
| - /** The unit of the measure. */
|
| - core.String unit;
|
| - /** The measure of an item. */
|
| - core.double value;
|
| +/** A batch entry encoding a single non-batch productstatuses response. */
|
| +class ProductstatusesCustomBatchResponseEntry {
|
| + /** The ID of the request entry this entry responds to. */
|
| + core.int batchId;
|
| + /** A list of errors, if the request failed. */
|
| + Errors errors;
|
| + /**
|
| + * Identifies what kind of resource this is. Value: the fixed string
|
| + * "content#productstatusesCustomBatchResponseEntry".
|
| + */
|
| + core.String kind;
|
| + /**
|
| + * The requested product status. Only defined if the request was successful.
|
| + */
|
| + ProductStatus productStatus;
|
|
|
| - ProductUnitPricingMeasure();
|
| + ProductstatusesCustomBatchResponseEntry();
|
|
|
| - ProductUnitPricingMeasure.fromJson(core.Map _json) {
|
| - if (_json.containsKey("unit")) {
|
| - unit = _json["unit"];
|
| + ProductstatusesCustomBatchResponseEntry.fromJson(core.Map _json) {
|
| + if (_json.containsKey("batchId")) {
|
| + batchId = _json["batchId"];
|
| }
|
| - if (_json.containsKey("value")) {
|
| - value = _json["value"];
|
| + if (_json.containsKey("errors")) {
|
| + errors = new Errors.fromJson(_json["errors"]);
|
| + }
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("productStatus")) {
|
| + productStatus = new ProductStatus.fromJson(_json["productStatus"]);
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (unit != null) {
|
| - _json["unit"] = unit;
|
| + if (batchId != null) {
|
| + _json["batchId"] = batchId;
|
| }
|
| - if (value != null) {
|
| - _json["value"] = value;
|
| + if (errors != null) {
|
| + _json["errors"] = (errors).toJson();
|
| + }
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (productStatus != null) {
|
| + _json["productStatus"] = (productStatus).toJson();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductsCustomBatchRequest {
|
| - /** The request entries to be processed in the batch. */
|
| - core.List<ProductsCustomBatchRequestEntry> entries;
|
| +class ProductstatusesListResponse {
|
| + /**
|
| + * Identifies what kind of resource this is. Value: the fixed string
|
| + * "content#productstatusesListResponse".
|
| + */
|
| + core.String kind;
|
| + /** The token for the retrieval of the next page of products statuses. */
|
| + core.String nextPageToken;
|
| + core.List<ProductStatus> resources;
|
|
|
| - ProductsCustomBatchRequest();
|
| + ProductstatusesListResponse();
|
|
|
| - ProductsCustomBatchRequest.fromJson(core.Map _json) {
|
| - if (_json.containsKey("entries")) {
|
| - entries = _json["entries"].map((value) => new ProductsCustomBatchRequestEntry.fromJson(value)).toList();
|
| + ProductstatusesListResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + if (_json.containsKey("nextPageToken")) {
|
| + nextPageToken = _json["nextPageToken"];
|
| + }
|
| + if (_json.containsKey("resources")) {
|
| + resources = _json["resources"].map((value) => new ProductStatus.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (entries != null) {
|
| - _json["entries"] = entries.map((value) => (value).toJson()).toList();
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + if (nextPageToken != null) {
|
| + _json["nextPageToken"] = nextPageToken;
|
| + }
|
| + if (resources != null) {
|
| + _json["resources"] = resources.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -/** A batch entry encoding a single non-batch products request. */
|
| -class ProductsCustomBatchRequestEntry {
|
| - /** An entry ID, unique within the batch request. */
|
| - core.int batchId;
|
| - /** The ID of the managing account. */
|
| - core.String merchantId;
|
| - core.String method;
|
| - /** The product to insert. Only required if the method is insert. */
|
| - Product product;
|
| +class RateGroup {
|
| /**
|
| - * The ID of the product to get or delete. Only defined if the method is get
|
| - * or delete.
|
| + * A list of shipping labels defining the products to which this rate group
|
| + * applies to. This is a disjunction: only one of the labels has to match for
|
| + * the rate group to apply. May only be empty for the last rate group of a
|
| + * service. Required.
|
| */
|
| - core.String productId;
|
| + core.List<core.String> applicableShippingLabels;
|
| + /**
|
| + * A list of carrier rates that can be referred to by mainTable or
|
| + * singleValue.
|
| + */
|
| + core.List<CarrierRate> carrierRates;
|
| + /**
|
| + * A table defining the rate group, when singleValue is not expressive enough.
|
| + * Can only be set if singleValue is not set.
|
| + */
|
| + Table mainTable;
|
| + /**
|
| + * The value of the rate group (e.g. flat rate $10). Can only be set if
|
| + * mainTable and subtables are not set.
|
| + */
|
| + Value singleValue;
|
| + /**
|
| + * A list of subtables referred to by mainTable. Can only be set if mainTable
|
| + * is set.
|
| + */
|
| + core.List<Table> subtables;
|
|
|
| - ProductsCustomBatchRequestEntry();
|
| + RateGroup();
|
|
|
| - ProductsCustomBatchRequestEntry.fromJson(core.Map _json) {
|
| - if (_json.containsKey("batchId")) {
|
| - batchId = _json["batchId"];
|
| + RateGroup.fromJson(core.Map _json) {
|
| + if (_json.containsKey("applicableShippingLabels")) {
|
| + applicableShippingLabels = _json["applicableShippingLabels"];
|
| }
|
| - if (_json.containsKey("merchantId")) {
|
| - merchantId = _json["merchantId"];
|
| + if (_json.containsKey("carrierRates")) {
|
| + carrierRates = _json["carrierRates"].map((value) => new CarrierRate.fromJson(value)).toList();
|
| }
|
| - if (_json.containsKey("method")) {
|
| - method = _json["method"];
|
| + if (_json.containsKey("mainTable")) {
|
| + mainTable = new Table.fromJson(_json["mainTable"]);
|
| }
|
| - if (_json.containsKey("product")) {
|
| - product = new Product.fromJson(_json["product"]);
|
| + if (_json.containsKey("singleValue")) {
|
| + singleValue = new Value.fromJson(_json["singleValue"]);
|
| }
|
| - if (_json.containsKey("productId")) {
|
| - productId = _json["productId"];
|
| + if (_json.containsKey("subtables")) {
|
| + subtables = _json["subtables"].map((value) => new Table.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (batchId != null) {
|
| - _json["batchId"] = batchId;
|
| + if (applicableShippingLabels != null) {
|
| + _json["applicableShippingLabels"] = applicableShippingLabels;
|
| }
|
| - if (merchantId != null) {
|
| - _json["merchantId"] = merchantId;
|
| + if (carrierRates != null) {
|
| + _json["carrierRates"] = carrierRates.map((value) => (value).toJson()).toList();
|
| }
|
| - if (method != null) {
|
| - _json["method"] = method;
|
| + if (mainTable != null) {
|
| + _json["mainTable"] = (mainTable).toJson();
|
| }
|
| - if (product != null) {
|
| - _json["product"] = (product).toJson();
|
| + if (singleValue != null) {
|
| + _json["singleValue"] = (singleValue).toJson();
|
| }
|
| - if (productId != null) {
|
| - _json["productId"] = productId;
|
| + if (subtables != null) {
|
| + _json["subtables"] = subtables.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductsCustomBatchResponse {
|
| - /** The result of the execution of the batch requests. */
|
| - core.List<ProductsCustomBatchResponseEntry> entries;
|
| +class Row {
|
| /**
|
| - * Identifies what kind of resource this is. Value: the fixed string
|
| - * "content#productsCustomBatchResponse".
|
| + * The list of cells that constitute the row. Must have the same length as
|
| + * columnHeaders for two-dimensional tables, a length of 1 for one-dimensional
|
| + * tables. Required.
|
| */
|
| - core.String kind;
|
| + core.List<Value> cells;
|
|
|
| - ProductsCustomBatchResponse();
|
| + Row();
|
|
|
| - ProductsCustomBatchResponse.fromJson(core.Map _json) {
|
| - if (_json.containsKey("entries")) {
|
| - entries = _json["entries"].map((value) => new ProductsCustomBatchResponseEntry.fromJson(value)).toList();
|
| - }
|
| - if (_json.containsKey("kind")) {
|
| - kind = _json["kind"];
|
| + Row.fromJson(core.Map _json) {
|
| + if (_json.containsKey("cells")) {
|
| + cells = _json["cells"].map((value) => new Value.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (entries != null) {
|
| - _json["entries"] = entries.map((value) => (value).toJson()).toList();
|
| - }
|
| - if (kind != null) {
|
| - _json["kind"] = kind;
|
| + if (cells != null) {
|
| + _json["cells"] = cells.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -/** A batch entry encoding a single non-batch products response. */
|
| -class ProductsCustomBatchResponseEntry {
|
| - /** The ID of the request entry this entry responds to. */
|
| - core.int batchId;
|
| - /** A list of errors defined if and only if the request failed. */
|
| - Errors errors;
|
| +class Service {
|
| /**
|
| - * Identifies what kind of resource this is. Value: the fixed string
|
| - * "content#productsCustomBatchResponseEntry".
|
| + * A boolean exposing the active status of the shipping service. Required.
|
| */
|
| - core.String kind;
|
| + core.bool active;
|
| /**
|
| - * The inserted product. Only defined if the method is insert and if the
|
| - * request was successful.
|
| + * The CLDR code of the currency to which this service applies. Must match
|
| + * that of the prices in rate groups.
|
| */
|
| - Product product;
|
| + core.String currency;
|
| + /**
|
| + * The CLDR territory code of the country to which the service applies.
|
| + * Required.
|
| + */
|
| + core.String deliveryCountry;
|
| + /**
|
| + * Time spent in various aspects from order to the delivery of the product.
|
| + * Required.
|
| + */
|
| + DeliveryTime deliveryTime;
|
| + /**
|
| + * Free-form name of the service. Must be unique within target account.
|
| + * Required.
|
| + */
|
| + core.String name;
|
| + /**
|
| + * Shipping rate group definitions. Only the last one is allowed to have an
|
| + * empty applicableShippingLabels, which means "everything else". The other
|
| + * applicableShippingLabels must not overlap.
|
| + */
|
| + core.List<RateGroup> rateGroups;
|
|
|
| - ProductsCustomBatchResponseEntry();
|
| + Service();
|
|
|
| - ProductsCustomBatchResponseEntry.fromJson(core.Map _json) {
|
| - if (_json.containsKey("batchId")) {
|
| - batchId = _json["batchId"];
|
| + Service.fromJson(core.Map _json) {
|
| + if (_json.containsKey("active")) {
|
| + active = _json["active"];
|
| }
|
| - if (_json.containsKey("errors")) {
|
| - errors = new Errors.fromJson(_json["errors"]);
|
| + if (_json.containsKey("currency")) {
|
| + currency = _json["currency"];
|
| }
|
| - if (_json.containsKey("kind")) {
|
| - kind = _json["kind"];
|
| + if (_json.containsKey("deliveryCountry")) {
|
| + deliveryCountry = _json["deliveryCountry"];
|
| }
|
| - if (_json.containsKey("product")) {
|
| - product = new Product.fromJson(_json["product"]);
|
| + if (_json.containsKey("deliveryTime")) {
|
| + deliveryTime = new DeliveryTime.fromJson(_json["deliveryTime"]);
|
| + }
|
| + if (_json.containsKey("name")) {
|
| + name = _json["name"];
|
| + }
|
| + if (_json.containsKey("rateGroups")) {
|
| + rateGroups = _json["rateGroups"].map((value) => new RateGroup.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (batchId != null) {
|
| - _json["batchId"] = batchId;
|
| + if (active != null) {
|
| + _json["active"] = active;
|
| }
|
| - if (errors != null) {
|
| - _json["errors"] = (errors).toJson();
|
| + if (currency != null) {
|
| + _json["currency"] = currency;
|
| }
|
| - if (kind != null) {
|
| - _json["kind"] = kind;
|
| + if (deliveryCountry != null) {
|
| + _json["deliveryCountry"] = deliveryCountry;
|
| }
|
| - if (product != null) {
|
| - _json["product"] = (product).toJson();
|
| + if (deliveryTime != null) {
|
| + _json["deliveryTime"] = (deliveryTime).toJson();
|
| + }
|
| + if (name != null) {
|
| + _json["name"] = name;
|
| + }
|
| + if (rateGroups != null) {
|
| + _json["rateGroups"] = rateGroups.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductsListResponse {
|
| +/** The merchant account's shipping settings. */
|
| +class ShippingSettings {
|
| /**
|
| - * Identifies what kind of resource this is. Value: the fixed string
|
| - * "content#productsListResponse".
|
| + * The ID of the account to which these account shipping settings belong.
|
| + * Ignored upon update, always present in get request responses.
|
| */
|
| - core.String kind;
|
| - /** The token for the retrieval of the next page of products. */
|
| - core.String nextPageToken;
|
| - core.List<Product> resources;
|
| + core.String accountId;
|
| + /**
|
| + * A list of postal code groups that can be referred to in services. Optional.
|
| + */
|
| + core.List<PostalCodeGroup> postalCodeGroups;
|
| + /** The target account's list of services. Optional. */
|
| + core.List<Service> services;
|
|
|
| - ProductsListResponse();
|
| + ShippingSettings();
|
|
|
| - ProductsListResponse.fromJson(core.Map _json) {
|
| - if (_json.containsKey("kind")) {
|
| - kind = _json["kind"];
|
| + ShippingSettings.fromJson(core.Map _json) {
|
| + if (_json.containsKey("accountId")) {
|
| + accountId = _json["accountId"];
|
| }
|
| - if (_json.containsKey("nextPageToken")) {
|
| - nextPageToken = _json["nextPageToken"];
|
| + if (_json.containsKey("postalCodeGroups")) {
|
| + postalCodeGroups = _json["postalCodeGroups"].map((value) => new PostalCodeGroup.fromJson(value)).toList();
|
| }
|
| - if (_json.containsKey("resources")) {
|
| - resources = _json["resources"].map((value) => new Product.fromJson(value)).toList();
|
| + if (_json.containsKey("services")) {
|
| + services = _json["services"].map((value) => new Service.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| - if (kind != null) {
|
| - _json["kind"] = kind;
|
| + if (accountId != null) {
|
| + _json["accountId"] = accountId;
|
| }
|
| - if (nextPageToken != null) {
|
| - _json["nextPageToken"] = nextPageToken;
|
| + if (postalCodeGroups != null) {
|
| + _json["postalCodeGroups"] = postalCodeGroups.map((value) => (value).toJson()).toList();
|
| }
|
| - if (resources != null) {
|
| - _json["resources"] = resources.map((value) => (value).toJson()).toList();
|
| + if (services != null) {
|
| + _json["services"] = services.map((value) => (value).toJson()).toList();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductstatusesCustomBatchRequest {
|
| +class ShippingsettingsCustomBatchRequest {
|
| /** The request entries to be processed in the batch. */
|
| - core.List<ProductstatusesCustomBatchRequestEntry> entries;
|
| + core.List<ShippingsettingsCustomBatchRequestEntry> entries;
|
|
|
| - ProductstatusesCustomBatchRequest();
|
| + ShippingsettingsCustomBatchRequest();
|
|
|
| - ProductstatusesCustomBatchRequest.fromJson(core.Map _json) {
|
| + ShippingsettingsCustomBatchRequest.fromJson(core.Map _json) {
|
| if (_json.containsKey("entries")) {
|
| - entries = _json["entries"].map((value) => new ProductstatusesCustomBatchRequestEntry.fromJson(value)).toList();
|
| + entries = _json["entries"].map((value) => new ShippingsettingsCustomBatchRequestEntry.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| @@ -10136,19 +11181,29 @@ class ProductstatusesCustomBatchRequest {
|
| }
|
| }
|
|
|
| -/** A batch entry encoding a single non-batch productstatuses request. */
|
| -class ProductstatusesCustomBatchRequestEntry {
|
| +/** A batch entry encoding a single non-batch accountshipping request. */
|
| +class ShippingsettingsCustomBatchRequestEntry {
|
| + /**
|
| + * The ID of the account for which to get/update account shipping settings.
|
| + */
|
| + core.String accountId;
|
| /** An entry ID, unique within the batch request. */
|
| core.int batchId;
|
| /** The ID of the managing account. */
|
| core.String merchantId;
|
| core.String method;
|
| - /** The ID of the product whose status to get. */
|
| - core.String productId;
|
| + /**
|
| + * The account shipping settings to update. Only defined if the method is
|
| + * update.
|
| + */
|
| + ShippingSettings shippingSettings;
|
|
|
| - ProductstatusesCustomBatchRequestEntry();
|
| + ShippingsettingsCustomBatchRequestEntry();
|
|
|
| - ProductstatusesCustomBatchRequestEntry.fromJson(core.Map _json) {
|
| + ShippingsettingsCustomBatchRequestEntry.fromJson(core.Map _json) {
|
| + if (_json.containsKey("accountId")) {
|
| + accountId = _json["accountId"];
|
| + }
|
| if (_json.containsKey("batchId")) {
|
| batchId = _json["batchId"];
|
| }
|
| @@ -10158,13 +11213,16 @@ class ProductstatusesCustomBatchRequestEntry {
|
| if (_json.containsKey("method")) {
|
| method = _json["method"];
|
| }
|
| - if (_json.containsKey("productId")) {
|
| - productId = _json["productId"];
|
| + if (_json.containsKey("shippingSettings")) {
|
| + shippingSettings = new ShippingSettings.fromJson(_json["shippingSettings"]);
|
| }
|
| }
|
|
|
| core.Map toJson() {
|
| var _json = new core.Map();
|
| + if (accountId != null) {
|
| + _json["accountId"] = accountId;
|
| + }
|
| if (batchId != null) {
|
| _json["batchId"] = batchId;
|
| }
|
| @@ -10174,27 +11232,27 @@ class ProductstatusesCustomBatchRequestEntry {
|
| if (method != null) {
|
| _json["method"] = method;
|
| }
|
| - if (productId != null) {
|
| - _json["productId"] = productId;
|
| + if (shippingSettings != null) {
|
| + _json["shippingSettings"] = (shippingSettings).toJson();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductstatusesCustomBatchResponse {
|
| +class ShippingsettingsCustomBatchResponse {
|
| /** The result of the execution of the batch requests. */
|
| - core.List<ProductstatusesCustomBatchResponseEntry> entries;
|
| + core.List<ShippingsettingsCustomBatchResponseEntry> entries;
|
| /**
|
| * Identifies what kind of resource this is. Value: the fixed string
|
| - * "content#productstatusesCustomBatchResponse".
|
| + * "content#shippingsettingsCustomBatchResponse".
|
| */
|
| core.String kind;
|
|
|
| - ProductstatusesCustomBatchResponse();
|
| + ShippingsettingsCustomBatchResponse();
|
|
|
| - ProductstatusesCustomBatchResponse.fromJson(core.Map _json) {
|
| + ShippingsettingsCustomBatchResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("entries")) {
|
| - entries = _json["entries"].map((value) => new ProductstatusesCustomBatchResponseEntry.fromJson(value)).toList();
|
| + entries = _json["entries"].map((value) => new ShippingsettingsCustomBatchResponseEntry.fromJson(value)).toList();
|
| }
|
| if (_json.containsKey("kind")) {
|
| kind = _json["kind"];
|
| @@ -10213,25 +11271,23 @@ class ProductstatusesCustomBatchResponse {
|
| }
|
| }
|
|
|
| -/** A batch entry encoding a single non-batch productstatuses response. */
|
| -class ProductstatusesCustomBatchResponseEntry {
|
| - /** The ID of the request entry this entry responds to. */
|
| +/** A batch entry encoding a single non-batch shipping settings response. */
|
| +class ShippingsettingsCustomBatchResponseEntry {
|
| + /** The ID of the request entry to which this entry responds. */
|
| core.int batchId;
|
| - /** A list of errors, if the request failed. */
|
| + /** A list of errors defined if, and only if, the request failed. */
|
| Errors errors;
|
| /**
|
| * Identifies what kind of resource this is. Value: the fixed string
|
| - * "content#productstatusesCustomBatchResponseEntry".
|
| + * "content#shippingsettingsCustomBatchResponseEntry".
|
| */
|
| core.String kind;
|
| - /**
|
| - * The requested product status. Only defined if the request was successful.
|
| - */
|
| - ProductStatus productStatus;
|
| + /** The retrieved or updated account shipping settings. */
|
| + ShippingSettings shippingSettings;
|
|
|
| - ProductstatusesCustomBatchResponseEntry();
|
| + ShippingsettingsCustomBatchResponseEntry();
|
|
|
| - ProductstatusesCustomBatchResponseEntry.fromJson(core.Map _json) {
|
| + ShippingsettingsCustomBatchResponseEntry.fromJson(core.Map _json) {
|
| if (_json.containsKey("batchId")) {
|
| batchId = _json["batchId"];
|
| }
|
| @@ -10241,8 +11297,8 @@ class ProductstatusesCustomBatchResponseEntry {
|
| if (_json.containsKey("kind")) {
|
| kind = _json["kind"];
|
| }
|
| - if (_json.containsKey("productStatus")) {
|
| - productStatus = new ProductStatus.fromJson(_json["productStatus"]);
|
| + if (_json.containsKey("shippingSettings")) {
|
| + shippingSettings = new ShippingSettings.fromJson(_json["shippingSettings"]);
|
| }
|
| }
|
|
|
| @@ -10257,26 +11313,58 @@ class ProductstatusesCustomBatchResponseEntry {
|
| if (kind != null) {
|
| _json["kind"] = kind;
|
| }
|
| - if (productStatus != null) {
|
| - _json["productStatus"] = (productStatus).toJson();
|
| + if (shippingSettings != null) {
|
| + _json["shippingSettings"] = (shippingSettings).toJson();
|
| }
|
| return _json;
|
| }
|
| }
|
|
|
| -class ProductstatusesListResponse {
|
| +class ShippingsettingsGetSupportedCarriersResponse {
|
| + /** A list of supported carriers. May be empty. */
|
| + core.List<CarriersCarrier> carriers;
|
| /**
|
| * Identifies what kind of resource this is. Value: the fixed string
|
| - * "content#productstatusesListResponse".
|
| + * "content#shippingsettingsGetSupportedCarriersResponse".
|
| */
|
| core.String kind;
|
| - /** The token for the retrieval of the next page of products statuses. */
|
| +
|
| + ShippingsettingsGetSupportedCarriersResponse();
|
| +
|
| + ShippingsettingsGetSupportedCarriersResponse.fromJson(core.Map _json) {
|
| + if (_json.containsKey("carriers")) {
|
| + carriers = _json["carriers"].map((value) => new CarriersCarrier.fromJson(value)).toList();
|
| + }
|
| + if (_json.containsKey("kind")) {
|
| + kind = _json["kind"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (carriers != null) {
|
| + _json["carriers"] = carriers.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (kind != null) {
|
| + _json["kind"] = kind;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class ShippingsettingsListResponse {
|
| + /**
|
| + * Identifies what kind of resource this is. Value: the fixed string
|
| + * "content#shippingsettingsListResponse".
|
| + */
|
| + core.String kind;
|
| + /** The token for the retrieval of the next page of shipping settings. */
|
| core.String nextPageToken;
|
| - core.List<ProductStatus> resources;
|
| + core.List<ShippingSettings> resources;
|
|
|
| - ProductstatusesListResponse();
|
| + ShippingsettingsListResponse();
|
|
|
| - ProductstatusesListResponse.fromJson(core.Map _json) {
|
| + ShippingsettingsListResponse.fromJson(core.Map _json) {
|
| if (_json.containsKey("kind")) {
|
| kind = _json["kind"];
|
| }
|
| @@ -10284,7 +11372,7 @@ class ProductstatusesListResponse {
|
| nextPageToken = _json["nextPageToken"];
|
| }
|
| if (_json.containsKey("resources")) {
|
| - resources = _json["resources"].map((value) => new ProductStatus.fromJson(value)).toList();
|
| + resources = _json["resources"].map((value) => new ShippingSettings.fromJson(value)).toList();
|
| }
|
| }
|
|
|
| @@ -10303,6 +11391,57 @@ class ProductstatusesListResponse {
|
| }
|
| }
|
|
|
| +class Table {
|
| + /**
|
| + * Headers of the table's columns. Optional: if not set then the table has
|
| + * only one dimension.
|
| + */
|
| + Headers columnHeaders;
|
| + /** Name of the table. Required for subtables, ignored for the main table. */
|
| + core.String name;
|
| + /** Headers of the table's rows. Required. */
|
| + Headers rowHeaders;
|
| + /**
|
| + * The list of rows that constitute the table. Must have the same length as
|
| + * rowHeaders. Required.
|
| + */
|
| + core.List<Row> rows;
|
| +
|
| + Table();
|
| +
|
| + Table.fromJson(core.Map _json) {
|
| + if (_json.containsKey("columnHeaders")) {
|
| + columnHeaders = new Headers.fromJson(_json["columnHeaders"]);
|
| + }
|
| + if (_json.containsKey("name")) {
|
| + name = _json["name"];
|
| + }
|
| + if (_json.containsKey("rowHeaders")) {
|
| + rowHeaders = new Headers.fromJson(_json["rowHeaders"]);
|
| + }
|
| + if (_json.containsKey("rows")) {
|
| + rows = _json["rows"].map((value) => new Row.fromJson(value)).toList();
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (columnHeaders != null) {
|
| + _json["columnHeaders"] = (columnHeaders).toJson();
|
| + }
|
| + if (name != null) {
|
| + _json["name"] = name;
|
| + }
|
| + if (rowHeaders != null) {
|
| + _json["rowHeaders"] = (rowHeaders).toJson();
|
| + }
|
| + if (rows != null) {
|
| + _json["rows"] = rows.map((value) => (value).toJson()).toList();
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| class TestOrder {
|
| /** The details of the customer who placed the order. */
|
| TestOrderCustomer customer;
|
| @@ -10665,6 +11804,76 @@ class TestOrderPaymentMethod {
|
| }
|
| }
|
|
|
| +/**
|
| + * The single value of a rate group or the value of a rate group table's cell.
|
| + * Exactly one of noShipping, flatRate, pricePercentage, carrierRateName,
|
| + * subtableName must be set.
|
| + */
|
| +class Value {
|
| + /**
|
| + * The name of a carrier rate referring to a carrier rate defined in the same
|
| + * rate group. Can only be set if all other fields are not set.
|
| + */
|
| + core.String carrierRateName;
|
| + /** A flat rate. Can only be set if all other fields are not set. */
|
| + Price flatRate;
|
| + /**
|
| + * If true, then the product can't ship. Must be true when set, can only be
|
| + * set if all other fields are not set.
|
| + */
|
| + core.bool noShipping;
|
| + /**
|
| + * A percentage of the price represented as a number in decimal notation
|
| + * (e.g., "5.4"). Can only be set if all other fields are not set.
|
| + */
|
| + core.String pricePercentage;
|
| + /**
|
| + * The name of a subtable. Can only be set in table cells (i.e., not for
|
| + * single values), and only if all other fields are not set.
|
| + */
|
| + core.String subtableName;
|
| +
|
| + Value();
|
| +
|
| + Value.fromJson(core.Map _json) {
|
| + if (_json.containsKey("carrierRateName")) {
|
| + carrierRateName = _json["carrierRateName"];
|
| + }
|
| + if (_json.containsKey("flatRate")) {
|
| + flatRate = new Price.fromJson(_json["flatRate"]);
|
| + }
|
| + if (_json.containsKey("noShipping")) {
|
| + noShipping = _json["noShipping"];
|
| + }
|
| + if (_json.containsKey("pricePercentage")) {
|
| + pricePercentage = _json["pricePercentage"];
|
| + }
|
| + if (_json.containsKey("subtableName")) {
|
| + subtableName = _json["subtableName"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (carrierRateName != null) {
|
| + _json["carrierRateName"] = carrierRateName;
|
| + }
|
| + if (flatRate != null) {
|
| + _json["flatRate"] = (flatRate).toJson();
|
| + }
|
| + if (noShipping != null) {
|
| + _json["noShipping"] = noShipping;
|
| + }
|
| + if (pricePercentage != null) {
|
| + _json["pricePercentage"] = pricePercentage;
|
| + }
|
| + if (subtableName != null) {
|
| + _json["subtableName"] = subtableName;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| class Weight {
|
| /** The weight unit. */
|
| core.String unit;
|
|
|