Esempio n. 1
0
        private void GenerateApiKey(IRandomDomainService randomDS)
        {
            const int apiKeyLength = 22;

            ApiKey = randomDS.GenerateRandomAlphanumericString(apiKeyLength);
        }
Esempio n. 2
0
 public RandomDomain(IRandomDomainService randomDomainService)
 {
     _randomDomainService = randomDomainService;
 }
Esempio n. 3
0
        public static Merchant RegisterNewMerchant(string name, CreditCardInformation creditCardInformation, IRandomDomainService randomDS)
        {
            var newMerchant = new Merchant
            {
                Name = name,
                CreditCardInformation = creditCardInformation
            };

            newMerchant.GenerateApiKey(randomDS);

            return(newMerchant);
        }