| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis.content.v2; | 3 library googleapis.content.v2; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client content/v2'; | 15 const core.String USER_AGENT = 'dart-api-client content/v2'; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Manage product items, inventory, and Merchant Center accounts for Google | 18 * Manages product items, inventory, and Merchant Center accounts for Google |
| 19 * Shopping. | 19 * Shopping. |
| 20 */ | 20 */ |
| 21 class ContentApi { | 21 class ContentApi { |
| 22 /** Manage your product listings and accounts for Google Shopping */ | 22 /** Manage your product listings and accounts for Google Shopping */ |
| 23 static const ContentScope = "https://www.googleapis.com/auth/content"; | 23 static const ContentScope = "https://www.googleapis.com/auth/content"; |
| 24 | 24 |
| 25 | 25 |
| 26 final commons.ApiRequester _requester; | 26 final commons.ApiRequester _requester; |
| 27 | 27 |
| 28 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); | 28 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); |
| (...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2073 * Sandbox only. Retrieves an order template that can be used to quickly | 2073 * Sandbox only. Retrieves an order template that can be used to quickly |
| 2074 * create a new order in sandbox. | 2074 * create a new order in sandbox. |
| 2075 * | 2075 * |
| 2076 * Request parameters: | 2076 * Request parameters: |
| 2077 * | 2077 * |
| 2078 * [merchantId] - The ID of the managing account. | 2078 * [merchantId] - The ID of the managing account. |
| 2079 * | 2079 * |
| 2080 * [templateName] - The name of the template to retrieve. | 2080 * [templateName] - The name of the template to retrieve. |
| 2081 * Possible string values are: | 2081 * Possible string values are: |
| 2082 * - "template1" | 2082 * - "template1" |
| 2083 * - "template1a" |
| 2084 * - "template1b" |
| 2083 * - "template2" | 2085 * - "template2" |
| 2084 * | 2086 * |
| 2085 * Completes with a [OrdersGetTestOrderTemplateResponse]. | 2087 * Completes with a [OrdersGetTestOrderTemplateResponse]. |
| 2086 * | 2088 * |
| 2087 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2089 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2088 * error. | 2090 * error. |
| 2089 * | 2091 * |
| 2090 * If the used [http.Client] completes with an error when making a REST call, | 2092 * If the used [http.Client] completes with an error when making a REST call, |
| 2091 * this method will complete with the same error. | 2093 * this method will complete with the same error. |
| 2092 */ | 2094 */ |
| (...skipping 2784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4877 core.int dayOfMonth; | 4879 core.int dayOfMonth; |
| 4878 /** | 4880 /** |
| 4879 * The URL where the feed file can be fetched. Google Merchant Center will | 4881 * The URL where the feed file can be fetched. Google Merchant Center will |
| 4880 * support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP | 4882 * support automatic scheduled uploads using the HTTP, HTTPS, FTP, or SFTP |
| 4881 * protocols, so the value will need to be a valid link using one of those | 4883 * protocols, so the value will need to be a valid link using one of those |
| 4882 * four protocols. | 4884 * four protocols. |
| 4883 */ | 4885 */ |
| 4884 core.String fetchUrl; | 4886 core.String fetchUrl; |
| 4885 /** The hour of the day the feed file should be fetched (0-23). */ | 4887 /** The hour of the day the feed file should be fetched (0-23). */ |
| 4886 core.int hour; | 4888 core.int hour; |
| 4889 /** |
| 4890 * The minute of the hour the feed file should be fetched (0-59). Read-only. |
| 4891 */ |
| 4892 core.int minuteOfHour; |
| 4887 /** An optional password for fetch_url. */ | 4893 /** An optional password for fetch_url. */ |
| 4888 core.String password; | 4894 core.String password; |
| 4889 /** | 4895 /** |
| 4890 * Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". | 4896 * Time zone used for schedule. UTC by default. E.g., "America/Los_Angeles". |
| 4891 */ | 4897 */ |
| 4892 core.String timeZone; | 4898 core.String timeZone; |
| 4893 /** An optional user name for fetch_url. */ | 4899 /** An optional user name for fetch_url. */ |
| 4894 core.String username; | 4900 core.String username; |
| 4895 /** The day of the week the feed file should be fetched. */ | 4901 /** The day of the week the feed file should be fetched. */ |
| 4896 core.String weekday; | 4902 core.String weekday; |
| 4897 | 4903 |
| 4898 DatafeedFetchSchedule(); | 4904 DatafeedFetchSchedule(); |
| 4899 | 4905 |
| 4900 DatafeedFetchSchedule.fromJson(core.Map _json) { | 4906 DatafeedFetchSchedule.fromJson(core.Map _json) { |
| 4901 if (_json.containsKey("dayOfMonth")) { | 4907 if (_json.containsKey("dayOfMonth")) { |
| 4902 dayOfMonth = _json["dayOfMonth"]; | 4908 dayOfMonth = _json["dayOfMonth"]; |
| 4903 } | 4909 } |
| 4904 if (_json.containsKey("fetchUrl")) { | 4910 if (_json.containsKey("fetchUrl")) { |
| 4905 fetchUrl = _json["fetchUrl"]; | 4911 fetchUrl = _json["fetchUrl"]; |
| 4906 } | 4912 } |
| 4907 if (_json.containsKey("hour")) { | 4913 if (_json.containsKey("hour")) { |
| 4908 hour = _json["hour"]; | 4914 hour = _json["hour"]; |
| 4909 } | 4915 } |
| 4916 if (_json.containsKey("minuteOfHour")) { |
| 4917 minuteOfHour = _json["minuteOfHour"]; |
| 4918 } |
| 4910 if (_json.containsKey("password")) { | 4919 if (_json.containsKey("password")) { |
| 4911 password = _json["password"]; | 4920 password = _json["password"]; |
| 4912 } | 4921 } |
| 4913 if (_json.containsKey("timeZone")) { | 4922 if (_json.containsKey("timeZone")) { |
| 4914 timeZone = _json["timeZone"]; | 4923 timeZone = _json["timeZone"]; |
| 4915 } | 4924 } |
| 4916 if (_json.containsKey("username")) { | 4925 if (_json.containsKey("username")) { |
| 4917 username = _json["username"]; | 4926 username = _json["username"]; |
| 4918 } | 4927 } |
| 4919 if (_json.containsKey("weekday")) { | 4928 if (_json.containsKey("weekday")) { |
| 4920 weekday = _json["weekday"]; | 4929 weekday = _json["weekday"]; |
| 4921 } | 4930 } |
| 4922 } | 4931 } |
| 4923 | 4932 |
| 4924 core.Map toJson() { | 4933 core.Map toJson() { |
| 4925 var _json = new core.Map(); | 4934 var _json = new core.Map(); |
| 4926 if (dayOfMonth != null) { | 4935 if (dayOfMonth != null) { |
| 4927 _json["dayOfMonth"] = dayOfMonth; | 4936 _json["dayOfMonth"] = dayOfMonth; |
| 4928 } | 4937 } |
| 4929 if (fetchUrl != null) { | 4938 if (fetchUrl != null) { |
| 4930 _json["fetchUrl"] = fetchUrl; | 4939 _json["fetchUrl"] = fetchUrl; |
| 4931 } | 4940 } |
| 4932 if (hour != null) { | 4941 if (hour != null) { |
| 4933 _json["hour"] = hour; | 4942 _json["hour"] = hour; |
| 4934 } | 4943 } |
| 4944 if (minuteOfHour != null) { |
| 4945 _json["minuteOfHour"] = minuteOfHour; |
| 4946 } |
| 4935 if (password != null) { | 4947 if (password != null) { |
| 4936 _json["password"] = password; | 4948 _json["password"] = password; |
| 4937 } | 4949 } |
| 4938 if (timeZone != null) { | 4950 if (timeZone != null) { |
| 4939 _json["timeZone"] = timeZone; | 4951 _json["timeZone"] = timeZone; |
| 4940 } | 4952 } |
| 4941 if (username != null) { | 4953 if (username != null) { |
| 4942 _json["username"] = username; | 4954 _json["username"] = username; |
| 4943 } | 4955 } |
| 4944 if (weekday != null) { | 4956 if (weekday != null) { |
| (...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6067 * grand total of $100 and a refund was issued for $20, the net amount will be | 6079 * grand total of $100 and a refund was issued for $20, the net amount will be |
| 6068 * $80. | 6080 * $80. |
| 6069 */ | 6081 */ |
| 6070 Price netAmount; | 6082 Price netAmount; |
| 6071 /** The details of the payment method. */ | 6083 /** The details of the payment method. */ |
| 6072 OrderPaymentMethod paymentMethod; | 6084 OrderPaymentMethod paymentMethod; |
| 6073 /** The status of the payment. */ | 6085 /** The status of the payment. */ |
| 6074 core.String paymentStatus; | 6086 core.String paymentStatus; |
| 6075 /** The date when the order was placed, in ISO 8601 format. */ | 6087 /** The date when the order was placed, in ISO 8601 format. */ |
| 6076 core.String placedDate; | 6088 core.String placedDate; |
| 6089 /** |
| 6090 * The details of the merchant provided promotions applied to the order. More |
| 6091 * details about the program are here. |
| 6092 */ |
| 6093 core.List<OrderPromotion> promotions; |
| 6077 /** Refunds for the order. */ | 6094 /** Refunds for the order. */ |
| 6078 core.List<OrderRefund> refunds; | 6095 core.List<OrderRefund> refunds; |
| 6079 /** Shipments of the order. */ | 6096 /** Shipments of the order. */ |
| 6080 core.List<OrderShipment> shipments; | 6097 core.List<OrderShipment> shipments; |
| 6081 /** The total cost of shipping for all items. */ | 6098 /** The total cost of shipping for all items. */ |
| 6082 Price shippingCost; | 6099 Price shippingCost; |
| 6083 /** The tax for the total shipping cost. */ | 6100 /** The tax for the total shipping cost. */ |
| 6084 Price shippingCostTax; | 6101 Price shippingCostTax; |
| 6085 /** The requested shipping option. */ | 6102 /** The requested shipping option. */ |
| 6086 core.String shippingOption; | 6103 core.String shippingOption; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6119 } | 6136 } |
| 6120 if (_json.containsKey("paymentMethod")) { | 6137 if (_json.containsKey("paymentMethod")) { |
| 6121 paymentMethod = new OrderPaymentMethod.fromJson(_json["paymentMethod"]); | 6138 paymentMethod = new OrderPaymentMethod.fromJson(_json["paymentMethod"]); |
| 6122 } | 6139 } |
| 6123 if (_json.containsKey("paymentStatus")) { | 6140 if (_json.containsKey("paymentStatus")) { |
| 6124 paymentStatus = _json["paymentStatus"]; | 6141 paymentStatus = _json["paymentStatus"]; |
| 6125 } | 6142 } |
| 6126 if (_json.containsKey("placedDate")) { | 6143 if (_json.containsKey("placedDate")) { |
| 6127 placedDate = _json["placedDate"]; | 6144 placedDate = _json["placedDate"]; |
| 6128 } | 6145 } |
| 6146 if (_json.containsKey("promotions")) { |
| 6147 promotions = _json["promotions"].map((value) => new OrderPromotion.fromJso
n(value)).toList(); |
| 6148 } |
| 6129 if (_json.containsKey("refunds")) { | 6149 if (_json.containsKey("refunds")) { |
| 6130 refunds = _json["refunds"].map((value) => new OrderRefund.fromJson(value))
.toList(); | 6150 refunds = _json["refunds"].map((value) => new OrderRefund.fromJson(value))
.toList(); |
| 6131 } | 6151 } |
| 6132 if (_json.containsKey("shipments")) { | 6152 if (_json.containsKey("shipments")) { |
| 6133 shipments = _json["shipments"].map((value) => new OrderShipment.fromJson(v
alue)).toList(); | 6153 shipments = _json["shipments"].map((value) => new OrderShipment.fromJson(v
alue)).toList(); |
| 6134 } | 6154 } |
| 6135 if (_json.containsKey("shippingCost")) { | 6155 if (_json.containsKey("shippingCost")) { |
| 6136 shippingCost = new Price.fromJson(_json["shippingCost"]); | 6156 shippingCost = new Price.fromJson(_json["shippingCost"]); |
| 6137 } | 6157 } |
| 6138 if (_json.containsKey("shippingCostTax")) { | 6158 if (_json.containsKey("shippingCostTax")) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6177 } | 6197 } |
| 6178 if (paymentMethod != null) { | 6198 if (paymentMethod != null) { |
| 6179 _json["paymentMethod"] = (paymentMethod).toJson(); | 6199 _json["paymentMethod"] = (paymentMethod).toJson(); |
| 6180 } | 6200 } |
| 6181 if (paymentStatus != null) { | 6201 if (paymentStatus != null) { |
| 6182 _json["paymentStatus"] = paymentStatus; | 6202 _json["paymentStatus"] = paymentStatus; |
| 6183 } | 6203 } |
| 6184 if (placedDate != null) { | 6204 if (placedDate != null) { |
| 6185 _json["placedDate"] = placedDate; | 6205 _json["placedDate"] = placedDate; |
| 6186 } | 6206 } |
| 6207 if (promotions != null) { |
| 6208 _json["promotions"] = promotions.map((value) => (value).toJson()).toList()
; |
| 6209 } |
| 6187 if (refunds != null) { | 6210 if (refunds != null) { |
| 6188 _json["refunds"] = refunds.map((value) => (value).toJson()).toList(); | 6211 _json["refunds"] = refunds.map((value) => (value).toJson()).toList(); |
| 6189 } | 6212 } |
| 6190 if (shipments != null) { | 6213 if (shipments != null) { |
| 6191 _json["shipments"] = shipments.map((value) => (value).toJson()).toList(); | 6214 _json["shipments"] = shipments.map((value) => (value).toJson()).toList(); |
| 6192 } | 6215 } |
| 6193 if (shippingCost != null) { | 6216 if (shippingCost != null) { |
| 6194 _json["shippingCost"] = (shippingCost).toJson(); | 6217 _json["shippingCost"] = (shippingCost).toJson(); |
| 6195 } | 6218 } |
| 6196 if (shippingCostTax != null) { | 6219 if (shippingCostTax != null) { |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6888 if (phoneNumber != null) { | 6911 if (phoneNumber != null) { |
| 6889 _json["phoneNumber"] = phoneNumber; | 6912 _json["phoneNumber"] = phoneNumber; |
| 6890 } | 6913 } |
| 6891 if (type != null) { | 6914 if (type != null) { |
| 6892 _json["type"] = type; | 6915 _json["type"] = type; |
| 6893 } | 6916 } |
| 6894 return _json; | 6917 return _json; |
| 6895 } | 6918 } |
| 6896 } | 6919 } |
| 6897 | 6920 |
| 6921 class OrderPromotion { |
| 6922 core.List<OrderPromotionBenefit> benefits; |
| 6923 /** |
| 6924 * The date and time frame when the promotion is active and ready for |
| 6925 * validation review. Note that the promotion live time may be delayed for a |
| 6926 * few hours due to the validation review. |
| 6927 * Start date and end date are separated by a forward slash (/). The start |
| 6928 * date is specified by the format (YYYY-MM-DD), followed by the letter ?T?, |
| 6929 * the time of the day when the sale starts (in Greenwich Mean Time, GMT), |
| 6930 * followed by an expression of the time zone for the sale. The end date is in |
| 6931 * the same format. |
| 6932 */ |
| 6933 core.String effectiveDates; |
| 6934 /** |
| 6935 * Optional. The text code that corresponds to the promotion when applied on |
| 6936 * the retailer?s website. |
| 6937 */ |
| 6938 core.String genericRedemptionCode; |
| 6939 /** The unique ID of the promotion. */ |
| 6940 core.String id; |
| 6941 /** The full title of the promotion. */ |
| 6942 core.String longTitle; |
| 6943 /** |
| 6944 * Whether the promotion is applicable to all products or only specific |
| 6945 * products. |
| 6946 */ |
| 6947 core.String productApplicability; |
| 6948 /** Indicates that the promotion is valid online. */ |
| 6949 core.String redemptionChannel; |
| 6950 |
| 6951 OrderPromotion(); |
| 6952 |
| 6953 OrderPromotion.fromJson(core.Map _json) { |
| 6954 if (_json.containsKey("benefits")) { |
| 6955 benefits = _json["benefits"].map((value) => new OrderPromotionBenefit.from
Json(value)).toList(); |
| 6956 } |
| 6957 if (_json.containsKey("effectiveDates")) { |
| 6958 effectiveDates = _json["effectiveDates"]; |
| 6959 } |
| 6960 if (_json.containsKey("genericRedemptionCode")) { |
| 6961 genericRedemptionCode = _json["genericRedemptionCode"]; |
| 6962 } |
| 6963 if (_json.containsKey("id")) { |
| 6964 id = _json["id"]; |
| 6965 } |
| 6966 if (_json.containsKey("longTitle")) { |
| 6967 longTitle = _json["longTitle"]; |
| 6968 } |
| 6969 if (_json.containsKey("productApplicability")) { |
| 6970 productApplicability = _json["productApplicability"]; |
| 6971 } |
| 6972 if (_json.containsKey("redemptionChannel")) { |
| 6973 redemptionChannel = _json["redemptionChannel"]; |
| 6974 } |
| 6975 } |
| 6976 |
| 6977 core.Map toJson() { |
| 6978 var _json = new core.Map(); |
| 6979 if (benefits != null) { |
| 6980 _json["benefits"] = benefits.map((value) => (value).toJson()).toList(); |
| 6981 } |
| 6982 if (effectiveDates != null) { |
| 6983 _json["effectiveDates"] = effectiveDates; |
| 6984 } |
| 6985 if (genericRedemptionCode != null) { |
| 6986 _json["genericRedemptionCode"] = genericRedemptionCode; |
| 6987 } |
| 6988 if (id != null) { |
| 6989 _json["id"] = id; |
| 6990 } |
| 6991 if (longTitle != null) { |
| 6992 _json["longTitle"] = longTitle; |
| 6993 } |
| 6994 if (productApplicability != null) { |
| 6995 _json["productApplicability"] = productApplicability; |
| 6996 } |
| 6997 if (redemptionChannel != null) { |
| 6998 _json["redemptionChannel"] = redemptionChannel; |
| 6999 } |
| 7000 return _json; |
| 7001 } |
| 7002 } |
| 7003 |
| 7004 class OrderPromotionBenefit { |
| 7005 /** The discount in the order price when the promotion is applied. */ |
| 7006 Price discount; |
| 7007 /** |
| 7008 * The OfferId(s) that were purchased in this order and map to this specific |
| 7009 * benefit of the promotion. |
| 7010 */ |
| 7011 core.List<core.String> offerIds; |
| 7012 /** |
| 7013 * Further describes the benefit of the promotion. Note that we will expand on |
| 7014 * this enumeration as we support new promotion sub-types. |
| 7015 */ |
| 7016 core.String subType; |
| 7017 /** The impact on tax when the promotion is applied. */ |
| 7018 Price taxImpact; |
| 7019 /** |
| 7020 * Describes whether the promotion applies to products (e.g. 20% off) or to |
| 7021 * shipping (e.g. Free Shipping). |
| 7022 */ |
| 7023 core.String type; |
| 7024 |
| 7025 OrderPromotionBenefit(); |
| 7026 |
| 7027 OrderPromotionBenefit.fromJson(core.Map _json) { |
| 7028 if (_json.containsKey("discount")) { |
| 7029 discount = new Price.fromJson(_json["discount"]); |
| 7030 } |
| 7031 if (_json.containsKey("offerIds")) { |
| 7032 offerIds = _json["offerIds"]; |
| 7033 } |
| 7034 if (_json.containsKey("subType")) { |
| 7035 subType = _json["subType"]; |
| 7036 } |
| 7037 if (_json.containsKey("taxImpact")) { |
| 7038 taxImpact = new Price.fromJson(_json["taxImpact"]); |
| 7039 } |
| 7040 if (_json.containsKey("type")) { |
| 7041 type = _json["type"]; |
| 7042 } |
| 7043 } |
| 7044 |
| 7045 core.Map toJson() { |
| 7046 var _json = new core.Map(); |
| 7047 if (discount != null) { |
| 7048 _json["discount"] = (discount).toJson(); |
| 7049 } |
| 7050 if (offerIds != null) { |
| 7051 _json["offerIds"] = offerIds; |
| 7052 } |
| 7053 if (subType != null) { |
| 7054 _json["subType"] = subType; |
| 7055 } |
| 7056 if (taxImpact != null) { |
| 7057 _json["taxImpact"] = (taxImpact).toJson(); |
| 7058 } |
| 7059 if (type != null) { |
| 7060 _json["type"] = type; |
| 7061 } |
| 7062 return _json; |
| 7063 } |
| 7064 } |
| 7065 |
| 6898 class OrderRefund { | 7066 class OrderRefund { |
| 6899 /** The actor that created the refund. */ | 7067 /** The actor that created the refund. */ |
| 6900 core.String actor; | 7068 core.String actor; |
| 6901 /** The amount that is refunded. */ | 7069 /** The amount that is refunded. */ |
| 6902 Price amount; | 7070 Price amount; |
| 6903 /** Date on which the item has been created, in ISO 8601 format. */ | 7071 /** Date on which the item has been created, in ISO 8601 format. */ |
| 6904 core.String creationDate; | 7072 core.String creationDate; |
| 6905 /** The reason for the refund. */ | 7073 /** The reason for the refund. */ |
| 6906 core.String reason; | 7074 core.String reason; |
| 6907 /** The explanation of the reason. */ | 7075 /** The explanation of the reason. */ |
| (...skipping 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8576 /** Whether an item is available for purchase only online. */ | 8744 /** Whether an item is available for purchase only online. */ |
| 8577 core.bool onlineOnly; | 8745 core.bool onlineOnly; |
| 8578 /** The item's pattern (e.g. polka dots). */ | 8746 /** The item's pattern (e.g. polka dots). */ |
| 8579 core.String pattern; | 8747 core.String pattern; |
| 8580 /** Price of the item. */ | 8748 /** Price of the item. */ |
| 8581 Price price; | 8749 Price price; |
| 8582 /** | 8750 /** |
| 8583 * Your category of the item (formatted as in product feeds specification). | 8751 * Your category of the item (formatted as in product feeds specification). |
| 8584 */ | 8752 */ |
| 8585 core.String productType; | 8753 core.String productType; |
| 8754 /** The unique ID of a promotion. */ |
| 8755 core.List<core.String> promotionIds; |
| 8586 /** Advertised sale price of the item. */ | 8756 /** Advertised sale price of the item. */ |
| 8587 Price salePrice; | 8757 Price salePrice; |
| 8588 /** | 8758 /** |
| 8589 * Date range during which the item is on sale (see product feed | 8759 * Date range during which the item is on sale (see product feed |
| 8590 * specifications). | 8760 * specifications). |
| 8591 */ | 8761 */ |
| 8592 core.String salePriceEffectiveDate; | 8762 core.String salePriceEffectiveDate; |
| 8593 /** The quantity of the product that is reserved for sell-on-google ads. */ | 8763 /** The quantity of the product that is reserved for sell-on-google ads. */ |
| 8594 core.String sellOnGoogleQuantity; | 8764 core.String sellOnGoogleQuantity; |
| 8595 /** Shipping rules. */ | 8765 /** Shipping rules. */ |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8777 } | 8947 } |
| 8778 if (_json.containsKey("pattern")) { | 8948 if (_json.containsKey("pattern")) { |
| 8779 pattern = _json["pattern"]; | 8949 pattern = _json["pattern"]; |
| 8780 } | 8950 } |
| 8781 if (_json.containsKey("price")) { | 8951 if (_json.containsKey("price")) { |
| 8782 price = new Price.fromJson(_json["price"]); | 8952 price = new Price.fromJson(_json["price"]); |
| 8783 } | 8953 } |
| 8784 if (_json.containsKey("productType")) { | 8954 if (_json.containsKey("productType")) { |
| 8785 productType = _json["productType"]; | 8955 productType = _json["productType"]; |
| 8786 } | 8956 } |
| 8957 if (_json.containsKey("promotionIds")) { |
| 8958 promotionIds = _json["promotionIds"]; |
| 8959 } |
| 8787 if (_json.containsKey("salePrice")) { | 8960 if (_json.containsKey("salePrice")) { |
| 8788 salePrice = new Price.fromJson(_json["salePrice"]); | 8961 salePrice = new Price.fromJson(_json["salePrice"]); |
| 8789 } | 8962 } |
| 8790 if (_json.containsKey("salePriceEffectiveDate")) { | 8963 if (_json.containsKey("salePriceEffectiveDate")) { |
| 8791 salePriceEffectiveDate = _json["salePriceEffectiveDate"]; | 8964 salePriceEffectiveDate = _json["salePriceEffectiveDate"]; |
| 8792 } | 8965 } |
| 8793 if (_json.containsKey("sellOnGoogleQuantity")) { | 8966 if (_json.containsKey("sellOnGoogleQuantity")) { |
| 8794 sellOnGoogleQuantity = _json["sellOnGoogleQuantity"]; | 8967 sellOnGoogleQuantity = _json["sellOnGoogleQuantity"]; |
| 8795 } | 8968 } |
| 8796 if (_json.containsKey("shipping")) { | 8969 if (_json.containsKey("shipping")) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8991 } | 9164 } |
| 8992 if (pattern != null) { | 9165 if (pattern != null) { |
| 8993 _json["pattern"] = pattern; | 9166 _json["pattern"] = pattern; |
| 8994 } | 9167 } |
| 8995 if (price != null) { | 9168 if (price != null) { |
| 8996 _json["price"] = (price).toJson(); | 9169 _json["price"] = (price).toJson(); |
| 8997 } | 9170 } |
| 8998 if (productType != null) { | 9171 if (productType != null) { |
| 8999 _json["productType"] = productType; | 9172 _json["productType"] = productType; |
| 9000 } | 9173 } |
| 9174 if (promotionIds != null) { |
| 9175 _json["promotionIds"] = promotionIds; |
| 9176 } |
| 9001 if (salePrice != null) { | 9177 if (salePrice != null) { |
| 9002 _json["salePrice"] = (salePrice).toJson(); | 9178 _json["salePrice"] = (salePrice).toJson(); |
| 9003 } | 9179 } |
| 9004 if (salePriceEffectiveDate != null) { | 9180 if (salePriceEffectiveDate != null) { |
| 9005 _json["salePriceEffectiveDate"] = salePriceEffectiveDate; | 9181 _json["salePriceEffectiveDate"] = salePriceEffectiveDate; |
| 9006 } | 9182 } |
| 9007 if (sellOnGoogleQuantity != null) { | 9183 if (sellOnGoogleQuantity != null) { |
| 9008 _json["sellOnGoogleQuantity"] = sellOnGoogleQuantity; | 9184 _json["sellOnGoogleQuantity"] = sellOnGoogleQuantity; |
| 9009 } | 9185 } |
| 9010 if (shipping != null) { | 9186 if (shipping != null) { |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10094 */ | 10270 */ |
| 10095 core.String kind; | 10271 core.String kind; |
| 10096 /** Line items that are ordered. At least one line item must be provided. */ | 10272 /** Line items that are ordered. At least one line item must be provided. */ |
| 10097 core.List<TestOrderLineItem> lineItems; | 10273 core.List<TestOrderLineItem> lineItems; |
| 10098 /** The details of the payment method. */ | 10274 /** The details of the payment method. */ |
| 10099 TestOrderPaymentMethod paymentMethod; | 10275 TestOrderPaymentMethod paymentMethod; |
| 10100 /** | 10276 /** |
| 10101 * Identifier of one of the predefined delivery addresses for the delivery. | 10277 * Identifier of one of the predefined delivery addresses for the delivery. |
| 10102 */ | 10278 */ |
| 10103 core.String predefinedDeliveryAddress; | 10279 core.String predefinedDeliveryAddress; |
| 10280 /** |
| 10281 * The details of the merchant provided promotions applied to the order. More |
| 10282 * details about the program are here. |
| 10283 */ |
| 10284 core.List<OrderPromotion> promotions; |
| 10104 /** The total cost of shipping for all items. */ | 10285 /** The total cost of shipping for all items. */ |
| 10105 Price shippingCost; | 10286 Price shippingCost; |
| 10106 /** The tax for the total shipping cost. */ | 10287 /** The tax for the total shipping cost. */ |
| 10107 Price shippingCostTax; | 10288 Price shippingCostTax; |
| 10108 /** The requested shipping option. */ | 10289 /** The requested shipping option. */ |
| 10109 core.String shippingOption; | 10290 core.String shippingOption; |
| 10110 | 10291 |
| 10111 TestOrder(); | 10292 TestOrder(); |
| 10112 | 10293 |
| 10113 TestOrder.fromJson(core.Map _json) { | 10294 TestOrder.fromJson(core.Map _json) { |
| 10114 if (_json.containsKey("customer")) { | 10295 if (_json.containsKey("customer")) { |
| 10115 customer = new TestOrderCustomer.fromJson(_json["customer"]); | 10296 customer = new TestOrderCustomer.fromJson(_json["customer"]); |
| 10116 } | 10297 } |
| 10117 if (_json.containsKey("kind")) { | 10298 if (_json.containsKey("kind")) { |
| 10118 kind = _json["kind"]; | 10299 kind = _json["kind"]; |
| 10119 } | 10300 } |
| 10120 if (_json.containsKey("lineItems")) { | 10301 if (_json.containsKey("lineItems")) { |
| 10121 lineItems = _json["lineItems"].map((value) => new TestOrderLineItem.fromJs
on(value)).toList(); | 10302 lineItems = _json["lineItems"].map((value) => new TestOrderLineItem.fromJs
on(value)).toList(); |
| 10122 } | 10303 } |
| 10123 if (_json.containsKey("paymentMethod")) { | 10304 if (_json.containsKey("paymentMethod")) { |
| 10124 paymentMethod = new TestOrderPaymentMethod.fromJson(_json["paymentMethod"]
); | 10305 paymentMethod = new TestOrderPaymentMethod.fromJson(_json["paymentMethod"]
); |
| 10125 } | 10306 } |
| 10126 if (_json.containsKey("predefinedDeliveryAddress")) { | 10307 if (_json.containsKey("predefinedDeliveryAddress")) { |
| 10127 predefinedDeliveryAddress = _json["predefinedDeliveryAddress"]; | 10308 predefinedDeliveryAddress = _json["predefinedDeliveryAddress"]; |
| 10128 } | 10309 } |
| 10310 if (_json.containsKey("promotions")) { |
| 10311 promotions = _json["promotions"].map((value) => new OrderPromotion.fromJso
n(value)).toList(); |
| 10312 } |
| 10129 if (_json.containsKey("shippingCost")) { | 10313 if (_json.containsKey("shippingCost")) { |
| 10130 shippingCost = new Price.fromJson(_json["shippingCost"]); | 10314 shippingCost = new Price.fromJson(_json["shippingCost"]); |
| 10131 } | 10315 } |
| 10132 if (_json.containsKey("shippingCostTax")) { | 10316 if (_json.containsKey("shippingCostTax")) { |
| 10133 shippingCostTax = new Price.fromJson(_json["shippingCostTax"]); | 10317 shippingCostTax = new Price.fromJson(_json["shippingCostTax"]); |
| 10134 } | 10318 } |
| 10135 if (_json.containsKey("shippingOption")) { | 10319 if (_json.containsKey("shippingOption")) { |
| 10136 shippingOption = _json["shippingOption"]; | 10320 shippingOption = _json["shippingOption"]; |
| 10137 } | 10321 } |
| 10138 } | 10322 } |
| 10139 | 10323 |
| 10140 core.Map toJson() { | 10324 core.Map toJson() { |
| 10141 var _json = new core.Map(); | 10325 var _json = new core.Map(); |
| 10142 if (customer != null) { | 10326 if (customer != null) { |
| 10143 _json["customer"] = (customer).toJson(); | 10327 _json["customer"] = (customer).toJson(); |
| 10144 } | 10328 } |
| 10145 if (kind != null) { | 10329 if (kind != null) { |
| 10146 _json["kind"] = kind; | 10330 _json["kind"] = kind; |
| 10147 } | 10331 } |
| 10148 if (lineItems != null) { | 10332 if (lineItems != null) { |
| 10149 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList(); | 10333 _json["lineItems"] = lineItems.map((value) => (value).toJson()).toList(); |
| 10150 } | 10334 } |
| 10151 if (paymentMethod != null) { | 10335 if (paymentMethod != null) { |
| 10152 _json["paymentMethod"] = (paymentMethod).toJson(); | 10336 _json["paymentMethod"] = (paymentMethod).toJson(); |
| 10153 } | 10337 } |
| 10154 if (predefinedDeliveryAddress != null) { | 10338 if (predefinedDeliveryAddress != null) { |
| 10155 _json["predefinedDeliveryAddress"] = predefinedDeliveryAddress; | 10339 _json["predefinedDeliveryAddress"] = predefinedDeliveryAddress; |
| 10156 } | 10340 } |
| 10341 if (promotions != null) { |
| 10342 _json["promotions"] = promotions.map((value) => (value).toJson()).toList()
; |
| 10343 } |
| 10157 if (shippingCost != null) { | 10344 if (shippingCost != null) { |
| 10158 _json["shippingCost"] = (shippingCost).toJson(); | 10345 _json["shippingCost"] = (shippingCost).toJson(); |
| 10159 } | 10346 } |
| 10160 if (shippingCostTax != null) { | 10347 if (shippingCostTax != null) { |
| 10161 _json["shippingCostTax"] = (shippingCostTax).toJson(); | 10348 _json["shippingCostTax"] = (shippingCostTax).toJson(); |
| 10162 } | 10349 } |
| 10163 if (shippingOption != null) { | 10350 if (shippingOption != null) { |
| 10164 _json["shippingOption"] = shippingOption; | 10351 _json["shippingOption"] = shippingOption; |
| 10165 } | 10352 } |
| 10166 return _json; | 10353 return _json; |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10457 var _json = new core.Map(); | 10644 var _json = new core.Map(); |
| 10458 if (unit != null) { | 10645 if (unit != null) { |
| 10459 _json["unit"] = unit; | 10646 _json["unit"] = unit; |
| 10460 } | 10647 } |
| 10461 if (value != null) { | 10648 if (value != null) { |
| 10462 _json["value"] = value; | 10649 _json["value"] = value; |
| 10463 } | 10650 } |
| 10464 return _json; | 10651 return _json; |
| 10465 } | 10652 } |
| 10466 } | 10653 } |
| OLD | NEW |