public override Task <SwiftCredentialsResponse> GetSwiftCredentials(SwiftCredentialsRequest request, ServerCallContext context) { var resp = new SwiftCredentialsResponse(); resp.Result = new SwiftCredentialsResponse.Types.SwiftCredentials() { AccountName = "account-name", AccountNumber = "1234567890", BankAddress = "bank-address", Bic = "BIC123", CompanyAddress = "Company-name", CorrespondentAccount = "123111123123", PurposeOfPayment = "Purpose-1" }; return(Task.FromResult(resp)); }
public override async Task <SwiftCredentialsResponse> GetSwiftCredentials(SwiftCredentialsRequest request, ServerCallContext context) { var result = new SwiftCredentialsResponse(); var token = context.GetBearerToken(); var response = await _walletApiV1Client.SwiftCredentialsGetByAssetIdAsync(request.AssetId, token); if (response.Result != null) { result.Body = _mapper.Map <SwiftCredentialsResponse.Types.Body>(response.Result); } if (response.Error != null) { result.Error = response.Error.ToApiError(); } return(result); }