Пример #1
0
        private void DeleteVault(Guid vaultGuid, Person person)
        {
            var deleteVaultRequest = new DeleteVaultRequest(_id, _key, vaultGuid);

            var success = deleteVaultRequest.Execute();

            if (!success)
            {
                throw new Exception($"Sage failed to delete the vault for people id: {person.PeopleId}");
            }
        }
        private void DeleteVault(int vaultId, Person person)
        {
            var deleteVaultRequest = new DeleteVaultRequest(
                _userName,
                _password,
                vaultId.ToString(CultureInfo.InvariantCulture));

            var response = deleteVaultRequest.Execute();

            if (response.ResponseStatus != ResponseStatus.Approved)
            {
                throw new Exception("TransNational failed to delete the vault for people id: {0}, responseCode: {1}, responseText: {2}".Fmt(person.PeopleId, response.ResponseCode, response.ResponseText));
            }
        }