/// <summary> /// Initializes a new instance of the <see cref="Cart" /> class. /// </summary> /// <param name="cartId">Cart ID is any non-empty unique string.</param> /// <param name="cartTotal">Ecommerce cart total.</param> /// <param name="contact">Contact.</param> /// <param name="products">List of products.</param> public Cart(string cartId = default(string), double cartTotal = default(double), ContactBaseExtraFull contact = default(ContactBaseExtraFull), List <Product> products = default(List <Product>)) { this.CartId = cartId; this.CartTotal = cartTotal; this.Contact = contact; this.Products = products; }
/// <summary> /// Initializes a new instance of the <see cref="CreateOrder" /> class. /// </summary> /// <param name="orderTotal">Ecommerce cart total.</param> /// <param name="orderId">Order ID is any non-empty unique string (required).</param> /// <param name="cartId">Cart ID that originated this order.</param> /// <param name="contact">Contact.</param> /// <param name="products">List of products.</param> public CreateOrder(double orderTotal = default(double), string orderId = default(string), string cartId = default(string), ContactBaseExtraFull contact = default(ContactBaseExtraFull), List <Product> products = default(List <Product>)) { // to ensure "orderId" is required (not null) if (orderId == null) { throw new InvalidDataException("orderId is a required property for CreateOrder and cannot be null"); } else { this.OrderId = orderId; } this.OrderTotal = orderTotal; this.CartId = cartId; this.Contact = contact; this.Products = products; }