"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Cart = void 0;

var _propTypes = _interopRequireDefault(require("prop-types"));

var _customerInfo = require("./customer-info");

var _cartItem = require("./cart-item");

var _couponEntry = require("./coupon-entry");

var _orderAddress = require("./order-address");

var _shippingMethod = require("./shipping-method");

var _payment = require("./payment");

var _paymentMethod = require("./payment-method");

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */

/* Copyright (c) 2018 Mobify Research & Development Inc. All rights reserved. */

/* * *  *  * *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  *  * */
const Cart = {
  id: _propTypes.default.string.isRequired,
  customerInfo: _propTypes.default.shape(_customerInfo.CustomerInformation),
  items: _propTypes.default.arrayOf(_propTypes.default.shape(_cartItem.CartItem)),
  shippingAddress: _propTypes.default.shape(_orderAddress.OrderAddress),
  billingAddress: _propTypes.default.shape(_orderAddress.OrderAddress),
  shippingMethods: _propTypes.default.arrayOf(_propTypes.default.shape(_shippingMethod.ShippingMethod)),
  paymentMethods: _propTypes.default.arrayOf(_propTypes.default.shape(_paymentMethod.PaymentMethod)),
  selectedShippingMethodId: _propTypes.default.string,
  payments: _propTypes.default.arrayOf(_propTypes.default.shape(_payment.Payment)),
  couponEntries: _propTypes.default.arrayOf(_propTypes.default.shape(_couponEntry.CouponEntry)),
  subtotal: _propTypes.default.number,
  shipping: _propTypes.default.number,
  discounts: _propTypes.default.number,
  tax: _propTypes.default.number,
  total: _propTypes.default.number
  /**
   * @memberOf module:@mobify/commerce-integrations/dist/types
   * @typedef {Object} Cart
   * @property {String} id The cart id.
   * @property {module:@mobify/commerce-integrations/dist/types.CustomerInformation} customerInfo The information about the cart owner.
   * @property {Array.<module:@mobify/commerce-integrations/dist/types.CartItem>} items The cart items.
   * @property {module:@mobify/commerce-integrations/dist/types.OrderAddress} shippingAddress The destination shipping address.
   * @property {module:@mobify/commerce-integrations/dist/types.OrderAddress} billingAddress The billing address.
   * @property {Array.<module:@mobify/commerce-integrations/dist/types.ShippingMethod>} shippingMethods All the possible shipping methods for the cart.
   * @property {Array.<module:@mobify/commerce-integrations/dist/types.PaymentMethod>} paymentMethods All the possible payment methods for the cart.
   * @property {String} selectedShippingMethodId The selected shipping method for the cart.
   * @property {Array.<module:@mobify/commerce-integrations/dist/types.Payment>} payments All the current payments applied to the cart (such as credit card or gift card).
   * @property {Array.<module:@mobify/commerce-integrations/dist/types.CouponEntry>} couponEntries All the current coupons applied to the cart.
   * @property {Number} subtotal The subtotal before shipping, discounts, and tax.
   * @property {Number} shipping The shipping cost.
   * @property {Number} discounts The total of all discounts applied to the cart.
   * @property {Number} tax The total tax of the cart.
   * @property {Number} total The total cost of all the items in the cart after discounts, shipping, and tax.
   */

};
exports.Cart = Cart;