/// <summary>
 /// Constructor. See <a href="https://dev.maxmind.com/minfraud-score-and-insights-api-documentation/#Request_Body">
 /// the minFraud documentation</a> for a general overview of the request sent to the web
 /// service.
 /// </summary>
 /// <param name="device">Information about the device used in the transaction. This param is required.</param>
 /// <param name="account">Information about the account used in the transaction.</param>
 /// <param name="billing">Billing information used in the transaction.</param>
 /// <param name="creditCard">Information about the credit card used in the transaction.</param>
 /// <param name="email">Information about the email used in the transaction.</param>
 /// <param name="userEvent">Details about the event such as the time.</param>
 /// <param name="order">Details about the order.</param>
 /// <param name="payment">Information about the payment processing.</param>
 /// <param name="shipping">Shipping information used in the transaction.</param>
 /// <param name="shoppingCart">List of shopping items in the transaction.</param>
 public Transaction(
     Device device,
     Account account = null,
     Billing billing = null,
     CreditCard creditCard = null,
     Email email = null,
     Event userEvent = null,
     Order order = null,
     Payment payment = null,
     Shipping shipping = null,
     IList<ShoppingCartItem> shoppingCart = default(List<ShoppingCartItem>)
     )
 {
     this.Device = device;
     this.Account = account;
     this.Billing = billing;
     this.CreditCard = creditCard;
     this.Email = email;
     this.Event = userEvent;
     this.Order = order;
     this.Payment = payment;
     this.Shipping = shipping;
     ShoppingCart = shoppingCart;
 }
 public void TestSubaffiliateId()
 {
     var order = new Order(subaffiliateId: "saf");
     Assert.AreEqual("saf", order.SubaffiliateId);
 }
 public void TestIsGift()
 {
     var order = new Order(isGift: true);
     Assert.AreEqual(order.IsGift, true);
 }
 public void TestReferrerUri()
 {
     var uri = new Uri("http://www.mm.com/");
     var order = new Order(referrerUri: uri);
     Assert.AreEqual(uri, order.ReferrerUri);
 }
 public void TestHasGiftMessage()
 {
     var order = new Order(hasGiftMessage: true);
     Assert.AreEqual(order.HasGiftMessage, true);
 }
 public void TestDiscountCode()
 {
     var order = new Order(discountCode: "dsc");
     Assert.AreEqual("dsc", order.DiscountCode);
 }
 public void TestCurrency()
 {
     var order = new Order(currency: "USD");
     Assert.AreEqual("USD", order.Currency);
 }
 public void TestAmount()
 {
     var order = new Order(amount: (decimal)1.1);
     Assert.AreEqual((decimal)1.1, order.Amount);
 }
 public void TestAffiliateId()
 {
     var order = new Order(affiliateId: "af");
     Assert.AreEqual("af", order.AffiliateId);
 }