public void TestFirstName()
 {
     var loc = new Billing(
         firstName: "frst"
         );
     Assert.AreEqual("frst", loc.FirstName);
 }
示例#2
0
 /// <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;
 }
 /// <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 TestPhoneNumber()
 {
     string phone = "321-321-3213";
     var loc = new Billing(phoneNumber: phone);
     Assert.AreEqual(phone, loc.PhoneNumber);
 }
 public void TestPhoneCountryCode()
 {
     var loc = new Billing(phoneCountryCode: "1");
     Assert.AreEqual("1", loc.PhoneCountryCode);
 }
 public void TestLastName()
 {
     var loc = new Billing(lastName: "last");
     Assert.AreEqual("last", loc.LastName);
 }
 public void TestCompany()
 {
     var loc = new Billing(company: "company");
     Assert.AreEqual("company", loc.Company);
 }
 public void TestCountry()
 {
     var loc = new Billing(country: "US");
     Assert.AreEqual("US", loc.Country);
 }
 public void TestCity()
 {
     var loc = new Billing(city: "Pdx");
     Assert.AreEqual("Pdx", loc.City);
 }
 public void TestAddress2()
 {
     var loc = new Billing(address2: "addr2");
     Assert.AreEqual("addr2", loc.Address2);
 }
 public void TestAddress()
 {
     var loc = new Billing(address: "addr");
     Assert.AreEqual("addr", loc.Address);
 }
 public void TestRegion()
 {
     var loc = new Billing(region: "MN");
     Assert.AreEqual("MN", loc.Region);
 }
 public void TestPostal()
 {
     var loc = new Billing(postal: "03231");
     Assert.AreEqual("03231", loc.Postal);
 }