Esempio n. 1
0
        protected Address(string line1, string line2, string zipcode, string city, CountryIsoCode country)
        {
            if (string.IsNullOrWhiteSpace(line1))
            {
                throw SheaftException.Validation("La ligne d'adresse est requise.");
            }

            if (string.IsNullOrWhiteSpace(zipcode))
            {
                throw SheaftException.Validation("Le code postal est requis.");
            }

            if (string.IsNullOrWhiteSpace(city))
            {
                throw SheaftException.Validation("La ville est requise.");
            }

            Line1   = line1;
            Line2   = line2;
            City    = city;
            Country = country;

            if (zipcode.Length == 5)
            {
                Zipcode = zipcode;
            }
        }
Esempio n. 2
0
 public Ubo(Guid id, string firstname, string lastname, DateTimeOffset birthdate, UboAddress address, BirthAddress birthAddress, CountryIsoCode nationality)
 {
     Id          = id;
     FirstName   = firstname;
     LastName    = lastname;
     BirthDate   = birthdate;
     BirthPlace  = birthAddress;
     Address     = address;
     Nationality = nationality;
 }
Esempio n. 3
0
        public UserAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country, Department department, double?longitude = null, double?latitude = null)
            : base(line1, line2, zipcode, city, country)
        {
            Department = department;
            Longitude  = longitude;
            Latitude   = latitude;

            if (latitude.HasValue && longitude.HasValue)
            {
                Location = LocationProvider.CreatePoint(latitude.Value, longitude.Value);
            }
        }
Esempio n. 4
0
        public void SetAddress(BankAddress address)
        {
            if (address == null)
            {
                return;
            }

            Line1   = address.Line1;
            Line2   = address.Line2;
            Zipcode = address.Zipcode;
            City    = address.City;
            Country = address.Country;
        }
Esempio n. 5
0
 public OwnerAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country)
     : base(line1, line2, zipcode, city, country)
 {
 }
Esempio n. 6
0
 public ExpectedAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country, double?longitude = null, double?latitude = null)
     : base(line1, line2, zipcode, city, country)
 {
     Longitude = longitude;
     Latitude  = latitude;
 }
Esempio n. 7
0
 public void SetAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country, Department department, double?longitude = null, double?latitude = null)
 {
     Address = new UserAddress(line1, line2, zipcode, city, country, department, longitude, latitude);
 }
Esempio n. 8
0
 public void SetNationality(CountryIsoCode nationality)
 {
     Nationality = nationality;
 }
Esempio n. 9
0
 public void SetAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country,
                        double?longitude = null, double?latitude = null)
 {
     Address = new DeliveryAddress(line1, line2, zipcode, city, country, longitude, latitude);
 }
Esempio n. 10
0
        public DeliveryAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country, double?longitude, double?latitude) :
            base(line1, line2, zipcode, city, country)
        {
            Longitude = longitude;
            Latitude  = latitude;

            if (latitude.HasValue && longitude.HasValue)
            {
                Location = LocationProvider.CreatePoint(latitude.Value, longitude.Value);
            }
        }
Esempio n. 11
0
 public BirthAddress(string city, CountryIsoCode country)
 {
     City    = city;
     Country = country;
 }
Esempio n. 12
0
 public BillingAddress(string line1, string line2, string zipcode, string city, CountryIsoCode country, string name) :
     base(line1, line2, zipcode, city, country)
 {
     Name = name;
 }