Exemple #1
0
        public void T026Response200()
        {
            var entity = api.GetEntity(
                DefaultConfig.SecondUser.UserHandle,
                DefaultConfig.SecondUser.PrivateKey
                );

            var parsedEntityResponse = (GetEntityResponse)entity.Data;

            foreach (var membership in parsedEntityResponse.Memberships)
            {
                if (membership.Role.Equals("beneficial_owner"))
                {
                    DefaultConfig.CertificationToken = membership.CertificationToken;
                    break;
                }
            }

            var response = api.CertifyBeneficialOwner(
                DefaultConfig.FirstUser.UserHandle,
                DefaultConfig.FirstUser.PrivateKey,
                DefaultConfig.BusinessUser.UserHandle,
                DefaultConfig.BusinessUser.PrivateKey,
                DefaultConfig.SecondUser.UserHandle,
                DefaultConfig.CertificationToken
                );

            var parsedResponse = (BaseResponse)response.Data;

            Assert.AreEqual(200, response.StatusCode);
            Assert.AreEqual("Beneficial owner successfully certified.", parsedResponse.Message);
        }
        public void Response200()
        {
            var response = api.GetEntity(
                DefaultConfig.SecondUser.UserHandle,
                DefaultConfig.SecondUser.PrivateKey
                );

            var parsedResponse = (GetEntityResponse)response.Data;

            Assert.AreEqual(200, response.StatusCode);
            Assert.IsTrue(parsedResponse.Addresses.Count > 0);
            Assert.IsNotNull(parsedResponse.Addresses.First().AddedEpoch);
            Assert.IsNotNull(parsedResponse.Addresses.First().City);
            Assert.IsNotNull(parsedResponse.Addresses.First().Country);
            Assert.IsNotNull(parsedResponse.Addresses.First().ModifiedEpoch);
            Assert.IsNotNull(parsedResponse.Addresses.First().PostalCode);
            Assert.IsNotNull(parsedResponse.Addresses.First().State);
            Assert.IsNotNull(parsedResponse.Addresses.First().StreetAddress1);
            Assert.IsNotNull(parsedResponse.Addresses.First().Uuid);
            Assert.IsTrue(parsedResponse.Emails.Count > 0);
            Assert.IsNotNull(parsedResponse.Emails.First().AddedEpoch);
            Assert.IsNotNull(parsedResponse.Emails.First().Email);
            Assert.IsNotNull(parsedResponse.Emails.First().ModifiedEpoch);
            Assert.IsNotNull(parsedResponse.Emails.First().Uuid);
            Assert.IsNotNull(parsedResponse.Entity.Birthdate);
            Assert.IsNotNull(parsedResponse.Entity.CreatedEpoch);
            Assert.IsNotNull(parsedResponse.Entity.FirstName);
            Assert.IsNotNull(parsedResponse.Entity.LastName);
            Assert.IsNotNull(parsedResponse.EntityType);
            Assert.IsTrue(parsedResponse.Identities.Count > 0);
            Assert.IsNotNull(parsedResponse.Identities.First().AddedEpoch);
            Assert.IsNotNull(parsedResponse.Identities.First().IdentityNumber);
            Assert.IsNotNull(parsedResponse.Identities.First().ModifiedEpoch);
            Assert.IsNotNull(parsedResponse.Identities.First().IdentityType);
            Assert.IsNotNull(parsedResponse.Identities.First().Uuid);
            Assert.IsTrue(parsedResponse.Memberships.Count > 0);
            Assert.IsNotNull(parsedResponse.Memberships.First().BusinessHandle);
            Assert.IsNotNull(parsedResponse.Memberships.First().EntityName);
            Assert.IsNotNull(parsedResponse.Memberships.First().Role);
            Assert.IsTrue(parsedResponse.Phones.Count > 0);
            Assert.IsNotNull(parsedResponse.Phones.First().AddedEpoch);
            Assert.IsNotNull(parsedResponse.Phones.First().ModifiedEpoch);
            Assert.IsNotNull(parsedResponse.Phones.First().Phone);
            Assert.IsNotNull(parsedResponse.Phones.First().Uuid);
            Assert.IsNotNull(parsedResponse.UserHandle);
        }
        public void Response200()
        {
            var user     = DefaultConfig.FirstUser;
            var response = api.GetEntity(user.UserHandle, user.PrivateKey);

            Assert.AreEqual(200, response.StatusCode);
            var entityResponse = (GetEntityResponse)response.Data;

            response = api.DeleteRegistrationData(user.UserHandle, user.PrivateKey, RegistrationData.Identity, entityResponse.Identities[0].Uuid);

            Assert.AreEqual(200, response.StatusCode);
            var parsedResponse = (BaseResponseWithoutReference)response.Data;

            Assert.IsTrue(parsedResponse.Success);
            Assert.AreEqual("SUCCESS", parsedResponse.Status);
        }