Esempio n. 1
0
        public async Task Run()
        {
            var sdk    = new Nullafi.NullafiSDK(Environment.GetEnvironmentVariable("API_KEY"));
            var client = await sdk.CreateClient();

            var staticVault = await client.CreateStaticVault("SSN Vault Example", null);

            SsnResponse created = await Create(staticVault);

            SsnResponse retrieved = await Retrieve(staticVault, created.Id);

            await RetrieveFromRealData(staticVault, created.Ssn);
            await Delete(staticVault, retrieved.Id);

            Assert.AreEqual(created.Id, retrieved.Id);
            Assert.AreEqual(created.Ssn, retrieved.Ssn);
            Assert.AreEqual(created.SsnAlias, retrieved.SsnAlias);

            SsnResponse createdWithState = await CreateWithState(staticVault);

            SsnResponse retrievedWithState = await Retrieve(staticVault, createdWithState.Id);

            await RetrieveFromRealData(staticVault, createdWithState.Ssn);
            await Delete(staticVault, retrievedWithState.Id);

            await client.DeleteStaticVault(staticVault.VaultId);
        }
        public async Task Run()
        {
            var sdk    = new Nullafi.NullafiSDK(Environment.GetEnvironmentVariable("API_KEY"));
            var client = await sdk.CreateClient();

            var staticVault = await client.CreateStaticVault("Date of Birth Vault Example", null);

            DateOfBirthResponse created = await Create(staticVault);

            DateOfBirthResponse retrieved = await Retrieve(staticVault, created.Id);

            await RetrieveFromRealData(staticVault, created.DateOfBirth);
            await Delete(staticVault, retrieved.Id);

            Assert.AreEqual(created.Id, retrieved.Id);
            Assert.AreEqual(created.DateOfBirth, retrieved.DateOfBirth);
            Assert.AreEqual(created.DateOfBirthAlias, retrieved.DateOfBirthAlias);

            DateOfBirthResponse createdWithYear = await CreateWithYear(staticVault);

            DateOfBirthResponse retrievedWithYear = await Retrieve(staticVault, createdWithYear.Id);

            await RetrieveFromRealData(staticVault, createdWithYear.DateOfBirth);
            await Delete(staticVault, retrievedWithYear.Id);

            Assert.AreEqual(createdWithYear.Id, retrievedWithYear.Id);
            Assert.AreEqual(createdWithYear.DateOfBirth, retrievedWithYear.DateOfBirth);
            Assert.AreEqual(createdWithYear.DateOfBirthAlias, retrievedWithYear.DateOfBirthAlias);

            DateOfBirthResponse createdWithMonth = await CreateWithMonth(staticVault);

            DateOfBirthResponse retrievedWithMonth = await Retrieve(staticVault, createdWithMonth.Id);

            await RetrieveFromRealData(staticVault, created.DateOfBirth);
            await Delete(staticVault, retrievedWithMonth.Id);

            Assert.AreEqual(createdWithMonth.Id, retrievedWithMonth.Id);
            Assert.AreEqual(createdWithMonth.DateOfBirth, retrievedWithMonth.DateOfBirth);
            Assert.AreEqual(createdWithMonth.DateOfBirthAlias, retrievedWithMonth.DateOfBirthAlias);

            DateOfBirthResponse createdWithYearMonth = await CreateWithYearMonth(staticVault);

            DateOfBirthResponse retrievedWithYearMonth = await Retrieve(staticVault, createdWithYearMonth.Id);

            await RetrieveFromRealData(staticVault, createdWithYearMonth.DateOfBirth);
            await Delete(staticVault, retrievedWithYearMonth.Id);

            await client.DeleteStaticVault(staticVault.VaultId);
        }
Esempio n. 3
0
        public async Task Run()
        {
            var sdk    = new Nullafi.NullafiSDK(Environment.GetEnvironmentVariable("API_KEY"));
            var client = await sdk.CreateClient();

            var staticVault = await client.CreateStaticVault("Address Vault Example", null);

            RaceResponse created = await Create(staticVault);

            RaceResponse retrieved = await Retrieve(staticVault, created.Id);

            await RetrieveFromRealData(staticVault, created.Race);
            await Delete(staticVault, retrieved.Id);

            await client.DeleteStaticVault(staticVault.VaultId);
        }
Esempio n. 4
0
        public async Task Run()
        {
            var sdk    = new Nullafi.NullafiSDK(Environment.GetEnvironmentVariable("API_KEY"));
            var client = await sdk.CreateClient();

            var communicationVault = await client.CreateCommunicationVault("Email Vault Example", null);

            EmailResponse created = await Create(communicationVault);

            EmailResponse retrieved = await Retrieve(communicationVault, created.Id);

            await RetrieveFromRealData(communicationVault, created.Email);
            await Delete(communicationVault, retrieved.Id);

            Assert.AreEqual(created.Id, retrieved.Id);
            Assert.AreEqual(created.Email, retrieved.Email);
            Assert.AreEqual(created.EmailAlias, retrieved.EmailAlias);

            await client.DeleteStaticVault(communicationVault.VaultId);
        }