Ejemplo n.º 1
0
        protected CreditCard(IVoca cardholder, DateTime?openedDate, DateTime?expiryDate)
        {
            CardHolderSince = openedDate.GetValueOrDefault(DateTime.UtcNow);

            if (expiryDate == null)
            {
                ExpDate = Etx.RandomDate(Etx.RandomInteger(4, 6), null);
                ExpDate = new DateTime(ExpDate.Year, ExpDate.Month, Etx.RandomCoinToss() ? 1 : 15);
            }
            else
            {
                ExpDate = expiryDate.Value;
            }
            if (cardholder != null)
            {
                var fname = (cardholder.GetName(KindsOfNames.First) ?? String.Empty).ToUpper();
                var lname = (cardholder.GetName(KindsOfNames.Surname) ?? String.Empty).ToUpper();
                CardHolderName = string.IsNullOrWhiteSpace(fname) && string.IsNullOrWhiteSpace(lname)
                    ? (cardholder.GetName(KindsOfNames.Legal) ?? String.Empty).ToUpper()
                    : String.Join(" ", fname, lname);
            }

            Cvv    = $"{Etx.RandomInteger(7, 999),3:D3}";
            Number = GetRandomCardNumber();
        }
Ejemplo n.º 2
0
        protected VitalRecord(IVoca personName)
        {
            if (personName == null)
            {
                return;
            }

            PersonFullName = NfString.DistillSpaces(
                string.Join(" ", personName.GetName(KindsOfNames.First),
                            personName.GetName(KindsOfNames.Surname)));

            if (string.IsNullOrWhiteSpace(PersonFullName))
            {
                PersonFullName = personName.GetName(KindsOfNames.Legal);
            }
        }
Ejemplo n.º 3
0
        public AmericanDeathCert(MannerOfDeath mannerOfDeath, IVoca personName) : this(mannerOfDeath, (string)null)
        {
            if (personName == null)
            {
                return;
            }

            PersonFullName = NfString.DistillSpaces(
                string.Join(" ", personName.GetName(KindsOfNames.First),
                            personName.GetName(KindsOfNames.Middle),
                            personName.GetName(KindsOfNames.Surname)));

            if (string.IsNullOrWhiteSpace(PersonFullName))
            {
                PersonFullName = personName.GetName(KindsOfNames.Legal);
            }
        }
Ejemplo n.º 4
0
        public AmericanBirthCert(IVoca personName) : base((IVoca)null)
        {
            if (personName == null)
            {
                return;
            }

            PersonFullName = NfString.DistillSpaces(
                string.Join(" ", personName.GetName(KindsOfNames.First),
                            personName.GetName(KindsOfNames.Middle),
                            personName.GetName(KindsOfNames.Surname)));

            if (string.IsNullOrWhiteSpace(PersonFullName))
            {
                PersonFullName = personName.GetName(KindsOfNames.Legal);
            }
        }