Example #1
0
 public void SaveCheckoutInformation(ShoppingCart orderRequest, Address address, CreditCard card)
 {
     orderRequest.Buyer.SetAddress(address);
     orderRequest.Buyer.SetPaymentDetails(card);
     _customerRepository.Save(orderRequest.Buyer);
 }
Example #2
0
 public static Address Create(string street = "", string number = "", string city = "", string zip = "", string country = "")
 {
     var address = new Address {Street = street, Number = number, City = city, Zip = zip, Country = country};
     return address;
 }
Example #3
0
        /// <summary>
        /// Set the full postal address of the customer.
        /// </summary>
        /// <param name="address">New address</param>
        /// <returns>this instance</returns>
        public Customer SetAddress(Address address)
        {
            if (address != null)
                Address = address;

            return this;
        }