public override async Task <KycDocumentsResponse> GetKycDocuments(Empty request, ServerCallContext context) { var result = new KycDocumentsResponse(); var token = context.GetBearerToken(); var response = await _walletApiV1Client.GetKycProfilesDocumentsByProfileTypeAsync("LykkeEurope", token); if (response.Result != null) { foreach (var item in response.Result) { var document = _mapper.Map <KycDocument>(item.Value); if (item.Value.Files.Any()) { document.Files.AddRange(_mapper.Map <List <KycFile> >(item.Value.Files)); } result.Body = new KycDocumentsResponse.Types.Body(); result.Body.Result.Add(item.Key, document); } } if (response.Error != null) { result.Error = response.Error.ToApiError(); } return(result); }
public override Task <KycDocumentsResponse> GetKycDocuments(Empty request, ServerCallContext context) { var resp = new KycDocumentsResponse() { Result = { } }; return(Task.FromResult(resp)); }