| 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; |
| (...skipping 6196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6207 Installment installment; | 6207 Installment installment; |
| 6208 /** | 6208 /** |
| 6209 * Identifies what kind of resource this is. Value: the fixed string | 6209 * Identifies what kind of resource this is. Value: the fixed string |
| 6210 * "content#inventory". | 6210 * "content#inventory". |
| 6211 */ | 6211 */ |
| 6212 core.String kind; | 6212 core.String kind; |
| 6213 /** | 6213 /** |
| 6214 * Loyalty points that users receive after purchasing the item. Japan only. | 6214 * Loyalty points that users receive after purchasing the item. Japan only. |
| 6215 */ | 6215 */ |
| 6216 LoyaltyPoints loyaltyPoints; | 6216 LoyaltyPoints loyaltyPoints; |
| 6217 /** |
| 6218 * Store pickup information. Only supported for local inventory. Not setting |
| 6219 * pickup means "don't update" while setting it to the empty value ({} in |
| 6220 * JSON) means "delete". Otherwise, pickupMethod and pickupSla must be set |
| 6221 * together, unless pickupMethod is "not supported". |
| 6222 */ |
| 6223 InventoryPickup pickup; |
| 6217 /** The price of the product. */ | 6224 /** The price of the product. */ |
| 6218 Price price; | 6225 Price price; |
| 6219 /** | 6226 /** |
| 6220 * The quantity of the product. Must be equal to or greater than zero. | 6227 * The quantity of the product. Must be equal to or greater than zero. |
| 6221 * Supported only for local products. | 6228 * Supported only for local products. |
| 6222 */ | 6229 */ |
| 6223 core.int quantity; | 6230 core.int quantity; |
| 6224 /** | 6231 /** |
| 6225 * The sale price of the product. Mandatory if sale_price_effective_date is | 6232 * The sale price of the product. Mandatory if sale_price_effective_date is |
| 6226 * defined. | 6233 * defined. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 6245 } | 6252 } |
| 6246 if (_json.containsKey("installment")) { | 6253 if (_json.containsKey("installment")) { |
| 6247 installment = new Installment.fromJson(_json["installment"]); | 6254 installment = new Installment.fromJson(_json["installment"]); |
| 6248 } | 6255 } |
| 6249 if (_json.containsKey("kind")) { | 6256 if (_json.containsKey("kind")) { |
| 6250 kind = _json["kind"]; | 6257 kind = _json["kind"]; |
| 6251 } | 6258 } |
| 6252 if (_json.containsKey("loyaltyPoints")) { | 6259 if (_json.containsKey("loyaltyPoints")) { |
| 6253 loyaltyPoints = new LoyaltyPoints.fromJson(_json["loyaltyPoints"]); | 6260 loyaltyPoints = new LoyaltyPoints.fromJson(_json["loyaltyPoints"]); |
| 6254 } | 6261 } |
| 6262 if (_json.containsKey("pickup")) { |
| 6263 pickup = new InventoryPickup.fromJson(_json["pickup"]); |
| 6264 } |
| 6255 if (_json.containsKey("price")) { | 6265 if (_json.containsKey("price")) { |
| 6256 price = new Price.fromJson(_json["price"]); | 6266 price = new Price.fromJson(_json["price"]); |
| 6257 } | 6267 } |
| 6258 if (_json.containsKey("quantity")) { | 6268 if (_json.containsKey("quantity")) { |
| 6259 quantity = _json["quantity"]; | 6269 quantity = _json["quantity"]; |
| 6260 } | 6270 } |
| 6261 if (_json.containsKey("salePrice")) { | 6271 if (_json.containsKey("salePrice")) { |
| 6262 salePrice = new Price.fromJson(_json["salePrice"]); | 6272 salePrice = new Price.fromJson(_json["salePrice"]); |
| 6263 } | 6273 } |
| 6264 if (_json.containsKey("salePriceEffectiveDate")) { | 6274 if (_json.containsKey("salePriceEffectiveDate")) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 6276 } | 6286 } |
| 6277 if (installment != null) { | 6287 if (installment != null) { |
| 6278 _json["installment"] = (installment).toJson(); | 6288 _json["installment"] = (installment).toJson(); |
| 6279 } | 6289 } |
| 6280 if (kind != null) { | 6290 if (kind != null) { |
| 6281 _json["kind"] = kind; | 6291 _json["kind"] = kind; |
| 6282 } | 6292 } |
| 6283 if (loyaltyPoints != null) { | 6293 if (loyaltyPoints != null) { |
| 6284 _json["loyaltyPoints"] = (loyaltyPoints).toJson(); | 6294 _json["loyaltyPoints"] = (loyaltyPoints).toJson(); |
| 6285 } | 6295 } |
| 6296 if (pickup != null) { |
| 6297 _json["pickup"] = (pickup).toJson(); |
| 6298 } |
| 6286 if (price != null) { | 6299 if (price != null) { |
| 6287 _json["price"] = (price).toJson(); | 6300 _json["price"] = (price).toJson(); |
| 6288 } | 6301 } |
| 6289 if (quantity != null) { | 6302 if (quantity != null) { |
| 6290 _json["quantity"] = quantity; | 6303 _json["quantity"] = quantity; |
| 6291 } | 6304 } |
| 6292 if (salePrice != null) { | 6305 if (salePrice != null) { |
| 6293 _json["salePrice"] = (salePrice).toJson(); | 6306 _json["salePrice"] = (salePrice).toJson(); |
| 6294 } | 6307 } |
| 6295 if (salePriceEffectiveDate != null) { | 6308 if (salePriceEffectiveDate != null) { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6446 if (errors != null) { | 6459 if (errors != null) { |
| 6447 _json["errors"] = (errors).toJson(); | 6460 _json["errors"] = (errors).toJson(); |
| 6448 } | 6461 } |
| 6449 if (kind != null) { | 6462 if (kind != null) { |
| 6450 _json["kind"] = kind; | 6463 _json["kind"] = kind; |
| 6451 } | 6464 } |
| 6452 return _json; | 6465 return _json; |
| 6453 } | 6466 } |
| 6454 } | 6467 } |
| 6455 | 6468 |
| 6469 class InventoryPickup { |
| 6470 /** |
| 6471 * Whether store pickup is available for this offer and whether the pickup |
| 6472 * option should be shown as buy, reserve, or not supported. Only supported |
| 6473 * for local inventory. Unless the value is "not supported", must be submitted |
| 6474 * together with pickupSla. |
| 6475 */ |
| 6476 core.String pickupMethod; |
| 6477 /** |
| 6478 * The expected date that an order will be ready for pickup, relative to when |
| 6479 * the order is placed. Only supported for local inventory. Must be submitted |
| 6480 * together with pickupMethod. |
| 6481 */ |
| 6482 core.String pickupSla; |
| 6483 |
| 6484 InventoryPickup(); |
| 6485 |
| 6486 InventoryPickup.fromJson(core.Map _json) { |
| 6487 if (_json.containsKey("pickupMethod")) { |
| 6488 pickupMethod = _json["pickupMethod"]; |
| 6489 } |
| 6490 if (_json.containsKey("pickupSla")) { |
| 6491 pickupSla = _json["pickupSla"]; |
| 6492 } |
| 6493 } |
| 6494 |
| 6495 core.Map toJson() { |
| 6496 var _json = new core.Map(); |
| 6497 if (pickupMethod != null) { |
| 6498 _json["pickupMethod"] = pickupMethod; |
| 6499 } |
| 6500 if (pickupSla != null) { |
| 6501 _json["pickupSla"] = pickupSla; |
| 6502 } |
| 6503 return _json; |
| 6504 } |
| 6505 } |
| 6506 |
| 6456 class InventorySetRequest { | 6507 class InventorySetRequest { |
| 6457 /** The availability of the product. */ | 6508 /** The availability of the product. */ |
| 6458 core.String availability; | 6509 core.String availability; |
| 6459 /** Number and amount of installments to pay for an item. Brazil only. */ | 6510 /** Number and amount of installments to pay for an item. Brazil only. */ |
| 6460 Installment installment; | 6511 Installment installment; |
| 6461 /** | 6512 /** |
| 6462 * Loyalty points that users receive after purchasing the item. Japan only. | 6513 * Loyalty points that users receive after purchasing the item. Japan only. |
| 6463 */ | 6514 */ |
| 6464 LoyaltyPoints loyaltyPoints; | 6515 LoyaltyPoints loyaltyPoints; |
| 6516 /** |
| 6517 * Store pickup information. Only supported for local inventory. Not setting |
| 6518 * pickup means "don't update" while setting it to the empty value ({} in |
| 6519 * JSON) means "delete". Otherwise, pickupMethod and pickupSla must be set |
| 6520 * together, unless pickupMethod is "not supported". |
| 6521 */ |
| 6522 InventoryPickup pickup; |
| 6465 /** The price of the product. */ | 6523 /** The price of the product. */ |
| 6466 Price price; | 6524 Price price; |
| 6467 /** | 6525 /** |
| 6468 * The quantity of the product. Must be equal to or greater than zero. | 6526 * The quantity of the product. Must be equal to or greater than zero. |
| 6469 * Supported only for local products. | 6527 * Supported only for local products. |
| 6470 */ | 6528 */ |
| 6471 core.int quantity; | 6529 core.int quantity; |
| 6472 /** | 6530 /** |
| 6473 * The sale price of the product. Mandatory if sale_price_effective_date is | 6531 * The sale price of the product. Mandatory if sale_price_effective_date is |
| 6474 * defined. | 6532 * defined. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 6490 InventorySetRequest.fromJson(core.Map _json) { | 6548 InventorySetRequest.fromJson(core.Map _json) { |
| 6491 if (_json.containsKey("availability")) { | 6549 if (_json.containsKey("availability")) { |
| 6492 availability = _json["availability"]; | 6550 availability = _json["availability"]; |
| 6493 } | 6551 } |
| 6494 if (_json.containsKey("installment")) { | 6552 if (_json.containsKey("installment")) { |
| 6495 installment = new Installment.fromJson(_json["installment"]); | 6553 installment = new Installment.fromJson(_json["installment"]); |
| 6496 } | 6554 } |
| 6497 if (_json.containsKey("loyaltyPoints")) { | 6555 if (_json.containsKey("loyaltyPoints")) { |
| 6498 loyaltyPoints = new LoyaltyPoints.fromJson(_json["loyaltyPoints"]); | 6556 loyaltyPoints = new LoyaltyPoints.fromJson(_json["loyaltyPoints"]); |
| 6499 } | 6557 } |
| 6558 if (_json.containsKey("pickup")) { |
| 6559 pickup = new InventoryPickup.fromJson(_json["pickup"]); |
| 6560 } |
| 6500 if (_json.containsKey("price")) { | 6561 if (_json.containsKey("price")) { |
| 6501 price = new Price.fromJson(_json["price"]); | 6562 price = new Price.fromJson(_json["price"]); |
| 6502 } | 6563 } |
| 6503 if (_json.containsKey("quantity")) { | 6564 if (_json.containsKey("quantity")) { |
| 6504 quantity = _json["quantity"]; | 6565 quantity = _json["quantity"]; |
| 6505 } | 6566 } |
| 6506 if (_json.containsKey("salePrice")) { | 6567 if (_json.containsKey("salePrice")) { |
| 6507 salePrice = new Price.fromJson(_json["salePrice"]); | 6568 salePrice = new Price.fromJson(_json["salePrice"]); |
| 6508 } | 6569 } |
| 6509 if (_json.containsKey("salePriceEffectiveDate")) { | 6570 if (_json.containsKey("salePriceEffectiveDate")) { |
| 6510 salePriceEffectiveDate = _json["salePriceEffectiveDate"]; | 6571 salePriceEffectiveDate = _json["salePriceEffectiveDate"]; |
| 6511 } | 6572 } |
| 6512 if (_json.containsKey("sellOnGoogleQuantity")) { | 6573 if (_json.containsKey("sellOnGoogleQuantity")) { |
| 6513 sellOnGoogleQuantity = _json["sellOnGoogleQuantity"]; | 6574 sellOnGoogleQuantity = _json["sellOnGoogleQuantity"]; |
| 6514 } | 6575 } |
| 6515 } | 6576 } |
| 6516 | 6577 |
| 6517 core.Map toJson() { | 6578 core.Map toJson() { |
| 6518 var _json = new core.Map(); | 6579 var _json = new core.Map(); |
| 6519 if (availability != null) { | 6580 if (availability != null) { |
| 6520 _json["availability"] = availability; | 6581 _json["availability"] = availability; |
| 6521 } | 6582 } |
| 6522 if (installment != null) { | 6583 if (installment != null) { |
| 6523 _json["installment"] = (installment).toJson(); | 6584 _json["installment"] = (installment).toJson(); |
| 6524 } | 6585 } |
| 6525 if (loyaltyPoints != null) { | 6586 if (loyaltyPoints != null) { |
| 6526 _json["loyaltyPoints"] = (loyaltyPoints).toJson(); | 6587 _json["loyaltyPoints"] = (loyaltyPoints).toJson(); |
| 6527 } | 6588 } |
| 6589 if (pickup != null) { |
| 6590 _json["pickup"] = (pickup).toJson(); |
| 6591 } |
| 6528 if (price != null) { | 6592 if (price != null) { |
| 6529 _json["price"] = (price).toJson(); | 6593 _json["price"] = (price).toJson(); |
| 6530 } | 6594 } |
| 6531 if (quantity != null) { | 6595 if (quantity != null) { |
| 6532 _json["quantity"] = quantity; | 6596 _json["quantity"] = quantity; |
| 6533 } | 6597 } |
| 6534 if (salePrice != null) { | 6598 if (salePrice != null) { |
| 6535 _json["salePrice"] = (salePrice).toJson(); | 6599 _json["salePrice"] = (salePrice).toJson(); |
| 6536 } | 6600 } |
| 6537 if (salePriceEffectiveDate != null) { | 6601 if (salePriceEffectiveDate != null) { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6632 if (ratio != null) { | 6696 if (ratio != null) { |
| 6633 _json["ratio"] = ratio; | 6697 _json["ratio"] = ratio; |
| 6634 } | 6698 } |
| 6635 return _json; | 6699 return _json; |
| 6636 } | 6700 } |
| 6637 } | 6701 } |
| 6638 | 6702 |
| 6639 class Order { | 6703 class Order { |
| 6640 /** Whether the order was acknowledged. */ | 6704 /** Whether the order was acknowledged. */ |
| 6641 core.bool acknowledged; | 6705 core.bool acknowledged; |
| 6706 /** The channel type of the order: "purchaseOnGoogle" or "googleExpress". */ |
| 6707 core.String channelType; |
| 6642 /** The details of the customer who placed the order. */ | 6708 /** The details of the customer who placed the order. */ |
| 6643 OrderCustomer customer; | 6709 OrderCustomer customer; |
| 6644 /** The details for the delivery. */ | 6710 /** The details for the delivery. */ |
| 6645 OrderDeliveryDetails deliveryDetails; | 6711 OrderDeliveryDetails deliveryDetails; |
| 6646 /** The REST id of the order. Globally unique. */ | 6712 /** The REST id of the order. Globally unique. */ |
| 6647 core.String id; | 6713 core.String id; |
| 6648 /** | 6714 /** |
| 6649 * Identifies what kind of resource this is. Value: the fixed string | 6715 * Identifies what kind of resource this is. Value: the fixed string |
| 6650 * "content#order". | 6716 * "content#order". |
| 6651 */ | 6717 */ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6684 core.String shippingOption; | 6750 core.String shippingOption; |
| 6685 /** The status of the order. */ | 6751 /** The status of the order. */ |
| 6686 core.String status; | 6752 core.String status; |
| 6687 | 6753 |
| 6688 Order(); | 6754 Order(); |
| 6689 | 6755 |
| 6690 Order.fromJson(core.Map _json) { | 6756 Order.fromJson(core.Map _json) { |
| 6691 if (_json.containsKey("acknowledged")) { | 6757 if (_json.containsKey("acknowledged")) { |
| 6692 acknowledged = _json["acknowledged"]; | 6758 acknowledged = _json["acknowledged"]; |
| 6693 } | 6759 } |
| 6760 if (_json.containsKey("channelType")) { |
| 6761 channelType = _json["channelType"]; |
| 6762 } |
| 6694 if (_json.containsKey("customer")) { | 6763 if (_json.containsKey("customer")) { |
| 6695 customer = new OrderCustomer.fromJson(_json["customer"]); | 6764 customer = new OrderCustomer.fromJson(_json["customer"]); |
| 6696 } | 6765 } |
| 6697 if (_json.containsKey("deliveryDetails")) { | 6766 if (_json.containsKey("deliveryDetails")) { |
| 6698 deliveryDetails = new OrderDeliveryDetails.fromJson(_json["deliveryDetails
"]); | 6767 deliveryDetails = new OrderDeliveryDetails.fromJson(_json["deliveryDetails
"]); |
| 6699 } | 6768 } |
| 6700 if (_json.containsKey("id")) { | 6769 if (_json.containsKey("id")) { |
| 6701 id = _json["id"]; | 6770 id = _json["id"]; |
| 6702 } | 6771 } |
| 6703 if (_json.containsKey("kind")) { | 6772 if (_json.containsKey("kind")) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6745 if (_json.containsKey("status")) { | 6814 if (_json.containsKey("status")) { |
| 6746 status = _json["status"]; | 6815 status = _json["status"]; |
| 6747 } | 6816 } |
| 6748 } | 6817 } |
| 6749 | 6818 |
| 6750 core.Map toJson() { | 6819 core.Map toJson() { |
| 6751 var _json = new core.Map(); | 6820 var _json = new core.Map(); |
| 6752 if (acknowledged != null) { | 6821 if (acknowledged != null) { |
| 6753 _json["acknowledged"] = acknowledged; | 6822 _json["acknowledged"] = acknowledged; |
| 6754 } | 6823 } |
| 6824 if (channelType != null) { |
| 6825 _json["channelType"] = channelType; |
| 6826 } |
| 6755 if (customer != null) { | 6827 if (customer != null) { |
| 6756 _json["customer"] = (customer).toJson(); | 6828 _json["customer"] = (customer).toJson(); |
| 6757 } | 6829 } |
| 6758 if (deliveryDetails != null) { | 6830 if (deliveryDetails != null) { |
| 6759 _json["deliveryDetails"] = (deliveryDetails).toJson(); | 6831 _json["deliveryDetails"] = (deliveryDetails).toJson(); |
| 6760 } | 6832 } |
| 6761 if (id != null) { | 6833 if (id != null) { |
| 6762 _json["id"] = id; | 6834 _json["id"] = id; |
| 6763 } | 6835 } |
| 6764 if (kind != null) { | 6836 if (kind != null) { |
| (...skipping 5130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11895 var _json = new core.Map(); | 11967 var _json = new core.Map(); |
| 11896 if (unit != null) { | 11968 if (unit != null) { |
| 11897 _json["unit"] = unit; | 11969 _json["unit"] = unit; |
| 11898 } | 11970 } |
| 11899 if (value != null) { | 11971 if (value != null) { |
| 11900 _json["value"] = value; | 11972 _json["value"] = value; |
| 11901 } | 11973 } |
| 11902 return _json; | 11974 return _json; |
| 11903 } | 11975 } |
| 11904 } | 11976 } |
| OLD | NEW |