| Index: generated/googleapis/lib/content/v2sandbox.dart
|
| diff --git a/generated/googleapis/lib/content/v2sandbox.dart b/generated/googleapis/lib/content/v2sandbox.dart
|
| index 01fff6250f7eb952376c78eed1240f43f9775e8d..e863b9cce9e3029dc40d78cb164cc129a8e60e97 100644
|
| --- a/generated/googleapis/lib/content/v2sandbox.dart
|
| +++ b/generated/googleapis/lib/content/v2sandbox.dart
|
| @@ -15,7 +15,7 @@ export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show
|
| const core.String USER_AGENT = 'dart-api-client content/v2sandbox';
|
|
|
| /**
|
| - * Manage product items, inventory, and Merchant Center accounts for Google
|
| + * Manages product items, inventory, and Merchant Center accounts for Google
|
| * Shopping.
|
| */
|
| class ContentApi {
|
| @@ -412,6 +412,8 @@ class OrdersResourceApi {
|
| * [templateName] - The name of the template to retrieve.
|
| * Possible string values are:
|
| * - "template1"
|
| + * - "template1a"
|
| + * - "template1b"
|
| * - "template2"
|
| *
|
| * Completes with a [OrdersGetTestOrderTemplateResponse].
|
| @@ -901,6 +903,11 @@ class Order {
|
| core.String paymentStatus;
|
| /** The date when the order was placed, in ISO 8601 format. */
|
| core.String placedDate;
|
| + /**
|
| + * The details of the merchant provided promotions applied to the order. More
|
| + * details about the program are here.
|
| + */
|
| + core.List<OrderPromotion> promotions;
|
| /** Refunds for the order. */
|
| core.List<OrderRefund> refunds;
|
| /** Shipments of the order. */
|
| @@ -953,6 +960,9 @@ class Order {
|
| if (_json.containsKey("placedDate")) {
|
| placedDate = _json["placedDate"];
|
| }
|
| + if (_json.containsKey("promotions")) {
|
| + promotions = _json["promotions"].map((value) => new OrderPromotion.fromJson(value)).toList();
|
| + }
|
| if (_json.containsKey("refunds")) {
|
| refunds = _json["refunds"].map((value) => new OrderRefund.fromJson(value)).toList();
|
| }
|
| @@ -1011,6 +1021,9 @@ class Order {
|
| if (placedDate != null) {
|
| _json["placedDate"] = placedDate;
|
| }
|
| + if (promotions != null) {
|
| + _json["promotions"] = promotions.map((value) => (value).toJson()).toList();
|
| + }
|
| if (refunds != null) {
|
| _json["refunds"] = refunds.map((value) => (value).toJson()).toList();
|
| }
|
| @@ -1722,6 +1735,151 @@ class OrderPaymentMethod {
|
| }
|
| }
|
|
|
| +class OrderPromotion {
|
| + core.List<OrderPromotionBenefit> benefits;
|
| + /**
|
| + * The date and time frame when the promotion is active and ready for
|
| + * validation review. Note that the promotion live time may be delayed for a
|
| + * few hours due to the validation review.
|
| + * Start date and end date are separated by a forward slash (/). The start
|
| + * date is specified by the format (YYYY-MM-DD), followed by the letter ?T?,
|
| + * the time of the day when the sale starts (in Greenwich Mean Time, GMT),
|
| + * followed by an expression of the time zone for the sale. The end date is in
|
| + * the same format.
|
| + */
|
| + core.String effectiveDates;
|
| + /**
|
| + * Optional. The text code that corresponds to the promotion when applied on
|
| + * the retailer?s website.
|
| + */
|
| + core.String genericRedemptionCode;
|
| + /** The unique ID of the promotion. */
|
| + core.String id;
|
| + /** The full title of the promotion. */
|
| + core.String longTitle;
|
| + /**
|
| + * Whether the promotion is applicable to all products or only specific
|
| + * products.
|
| + */
|
| + core.String productApplicability;
|
| + /** Indicates that the promotion is valid online. */
|
| + core.String redemptionChannel;
|
| +
|
| + OrderPromotion();
|
| +
|
| + OrderPromotion.fromJson(core.Map _json) {
|
| + if (_json.containsKey("benefits")) {
|
| + benefits = _json["benefits"].map((value) => new OrderPromotionBenefit.fromJson(value)).toList();
|
| + }
|
| + if (_json.containsKey("effectiveDates")) {
|
| + effectiveDates = _json["effectiveDates"];
|
| + }
|
| + if (_json.containsKey("genericRedemptionCode")) {
|
| + genericRedemptionCode = _json["genericRedemptionCode"];
|
| + }
|
| + if (_json.containsKey("id")) {
|
| + id = _json["id"];
|
| + }
|
| + if (_json.containsKey("longTitle")) {
|
| + longTitle = _json["longTitle"];
|
| + }
|
| + if (_json.containsKey("productApplicability")) {
|
| + productApplicability = _json["productApplicability"];
|
| + }
|
| + if (_json.containsKey("redemptionChannel")) {
|
| + redemptionChannel = _json["redemptionChannel"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (benefits != null) {
|
| + _json["benefits"] = benefits.map((value) => (value).toJson()).toList();
|
| + }
|
| + if (effectiveDates != null) {
|
| + _json["effectiveDates"] = effectiveDates;
|
| + }
|
| + if (genericRedemptionCode != null) {
|
| + _json["genericRedemptionCode"] = genericRedemptionCode;
|
| + }
|
| + if (id != null) {
|
| + _json["id"] = id;
|
| + }
|
| + if (longTitle != null) {
|
| + _json["longTitle"] = longTitle;
|
| + }
|
| + if (productApplicability != null) {
|
| + _json["productApplicability"] = productApplicability;
|
| + }
|
| + if (redemptionChannel != null) {
|
| + _json["redemptionChannel"] = redemptionChannel;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| +class OrderPromotionBenefit {
|
| + /** The discount in the order price when the promotion is applied. */
|
| + Price discount;
|
| + /**
|
| + * The OfferId(s) that were purchased in this order and map to this specific
|
| + * benefit of the promotion.
|
| + */
|
| + core.List<core.String> offerIds;
|
| + /**
|
| + * Further describes the benefit of the promotion. Note that we will expand on
|
| + * this enumeration as we support new promotion sub-types.
|
| + */
|
| + core.String subType;
|
| + /** The impact on tax when the promotion is applied. */
|
| + Price taxImpact;
|
| + /**
|
| + * Describes whether the promotion applies to products (e.g. 20% off) or to
|
| + * shipping (e.g. Free Shipping).
|
| + */
|
| + core.String type;
|
| +
|
| + OrderPromotionBenefit();
|
| +
|
| + OrderPromotionBenefit.fromJson(core.Map _json) {
|
| + if (_json.containsKey("discount")) {
|
| + discount = new Price.fromJson(_json["discount"]);
|
| + }
|
| + if (_json.containsKey("offerIds")) {
|
| + offerIds = _json["offerIds"];
|
| + }
|
| + if (_json.containsKey("subType")) {
|
| + subType = _json["subType"];
|
| + }
|
| + if (_json.containsKey("taxImpact")) {
|
| + taxImpact = new Price.fromJson(_json["taxImpact"]);
|
| + }
|
| + if (_json.containsKey("type")) {
|
| + type = _json["type"];
|
| + }
|
| + }
|
| +
|
| + core.Map toJson() {
|
| + var _json = new core.Map();
|
| + if (discount != null) {
|
| + _json["discount"] = (discount).toJson();
|
| + }
|
| + if (offerIds != null) {
|
| + _json["offerIds"] = offerIds;
|
| + }
|
| + if (subType != null) {
|
| + _json["subType"] = subType;
|
| + }
|
| + if (taxImpact != null) {
|
| + _json["taxImpact"] = (taxImpact).toJson();
|
| + }
|
| + if (type != null) {
|
| + _json["type"] = type;
|
| + }
|
| + return _json;
|
| + }
|
| +}
|
| +
|
| class OrderRefund {
|
| /** The actor that created the refund. */
|
| core.String actor;
|
| @@ -3287,6 +3445,11 @@ class TestOrder {
|
| * Identifier of one of the predefined delivery addresses for the delivery.
|
| */
|
| core.String predefinedDeliveryAddress;
|
| + /**
|
| + * The details of the merchant provided promotions applied to the order. More
|
| + * details about the program are here.
|
| + */
|
| + core.List<OrderPromotion> promotions;
|
| /** The total cost of shipping for all items. */
|
| Price shippingCost;
|
| /** The tax for the total shipping cost. */
|
| @@ -3312,6 +3475,9 @@ class TestOrder {
|
| if (_json.containsKey("predefinedDeliveryAddress")) {
|
| predefinedDeliveryAddress = _json["predefinedDeliveryAddress"];
|
| }
|
| + if (_json.containsKey("promotions")) {
|
| + promotions = _json["promotions"].map((value) => new OrderPromotion.fromJson(value)).toList();
|
| + }
|
| if (_json.containsKey("shippingCost")) {
|
| shippingCost = new Price.fromJson(_json["shippingCost"]);
|
| }
|
| @@ -3340,6 +3506,9 @@ class TestOrder {
|
| if (predefinedDeliveryAddress != null) {
|
| _json["predefinedDeliveryAddress"] = predefinedDeliveryAddress;
|
| }
|
| + if (promotions != null) {
|
| + _json["promotions"] = promotions.map((value) => (value).toJson()).toList();
|
| + }
|
| if (shippingCost != null) {
|
| _json["shippingCost"] = (shippingCost).toJson();
|
| }
|
|
|