public KycStatusResponse GetClientKycStatus(KycStatusRequest request) { var existingEntity = _readerKycStatuses.Get( KycProfileNoSqlEntity.GeneratePartitionKey(), KycProfileNoSqlEntity.GenerateRowKey(request.ClientId)); if (existingEntity != null) { return(new KycStatusResponse { ClientId = existingEntity.Profile.ClientId, Level = existingEntity.Profile.KycLevel, RequiredDocuments = KycLevelHelper.GetRequiredDocuments(existingEntity.Profile), RequiredVerifications = existingEntity.Profile.RequiredVerifications, DepositStatus = existingEntity.Profile.DepositStatus, TradeStatus = existingEntity.Profile.TradeStatus, WithdrawalStatus = existingEntity.Profile.WithdrawalStatus, VerificationInProgress = !string.IsNullOrEmpty(existingEntity.Profile.ActiveVerificationId) }); } var entity = _kycStatusService.GetKycStatusAsync(new KycStatusRequest() { ClientId = request.ClientId }).Result; return(entity); }
public KycStatusResponse(string brokerId, KycProfile profile) { BrokerId = brokerId; ClientId = profile.ClientId; Level = profile.KycLevel; RequiredDocuments = KycLevelHelper.GetRequiredDocuments(profile); RequiredVerifications = profile.RequiredVerifications; DepositStatus = profile.DepositStatus; WithdrawalStatus = profile.WithdrawalStatus; TradeStatus = profile.TradeStatus; VerificationInProgress = string.IsNullOrEmpty(profile.ActiveVerificationId); Pep = profile.Pep; Country = profile.Country; BlockingReason = profile.BlockingReason; }