import PropTypes from 'prop-types';
import productSnapshotShape from './productSnapshot';
import discountSnapshotShape from './discountSnapshot';
import priceShape from './price';
/**
* Reusable object to use in `propTypes` for a `purchaseItem` prop.
* @type {Object}
* @category templating
*/
const purchaseItemShape = {
id: PropTypes.string.isRequired,
productSnapshot: PropTypes.shape(productSnapshotShape),
discountSnapshot: PropTypes.shape(discountSnapshotShape),
voucherSnapshot: PropTypes.shape({ code: PropTypes.string }),
quantity: PropTypes.number,
price: PropTypes.shape(priceShape).isRequired,
createdDateUTC: PropTypes.string.isRequired,
};
export default purchaseItemShape;