public GetAccountByIdFullResponse GetAccountByIdFull(string bankId, string accountId, string viewId) { var url = TokenStringFormat.Format( URL_GET_ACCOUNT_BY_ID_FULL, new { BankId = bankId, AccountId = accountId, ViewId = viewId }); return(this.DoGet <GetAccountByIdFullResponse>(url)); }
public GetAccountByIdCoreResponse GetAccountByIdCore(string bankId, string accountId) { var url = TokenStringFormat.Format( URL_GET_ACCOUNT_BY_ID_CORE, new { BankId = bankId, AccountId = accountId }); return(this.DoGet <GetAccountByIdCoreResponse>(url)); }
public void Consume(SampleMessage message) { this.apiClient.SaveSampleMessage(message); this.Log.Info( TokenStringFormat.Format( "SampleMessage: {Id}, {Timestamp}, {Data}.", message)); }
public IEnumerable <AccountInfo> GetAccountsAtBank(string bankId) { var url = TokenStringFormat.Format( URL_GET_ACCOUNTS_AT_BANK, new { BankId = bankId }); var accounts = this.DoGet <List <AccountInfo> >(url); return(accounts); }
public GetTransactionTypesOfferedByBankResponse GetTransactionTypesOfferedByBankResponse(string bankId) { var url = TokenStringFormat.Format( URL_GET_TRANSACTION_TYPES_OFFERED_BY_BANK, new { BankId = bankId }); return(this.DoGet <GetTransactionTypesOfferedByBankResponse>(url)); }
private string FormatRootDirectory(string zappDir) { var args = new { zappDir = zappDir }; var baseFormat = configStore.Value.Fuse.RootDirectory; return(TokenStringFormat.Format(baseFormat, args)); }
public GetTransactionsForAccountCoreResponse GetTransactionsForAccountCore(string bankId, string accountId) { var url = TokenStringFormat.Format( URL_GET_TRANSACTIONS_FOR_ACCOUNT_CORE, new { BankId = bankId, AccountId = accountId }); return(this.DoGet <GetTransactionsForAccountCoreResponse>(url)); }
private string FormatFusionDirectory(string fusionId, string epoch) { var args = new { fusionId = fusionId, epoch = epoch }; var baseFormat = configStore.Value.Fuse.FusionDirectoryPattern; return(TokenStringFormat.Format(baseFormat, args)); }
/// <summary> /// When RavenDb is running in "embedded" mode, the hosting web application acts as the container. This means that until the web app is loaded, /// a connection can't be established to RavenDB. This method hits the web application to ensure that it, and by extension RavenDB, are loaded /// </summary> private void LoadWebApp() { using (var client = new WebClient()) { client.DownloadData((string)TokenStringFormat.Format(ApplicationUrlTemplate, new { ServerConfiguration.WebApplication.Port, ApplicationName = ServerConfiguration.WebApplication.Name })); } }
public IEnumerable <TransactionRequestType> GetTransactionRequestTypesForAccount(string bankId, string accountId, string viewId) { var url = TokenStringFormat.Format( URL_GET_TRANSACTION_REQUEST_TYPES_FOR_ACCOUNT, new { BankId = bankId, AccountId = accountId, ViewId = viewId }); return(this.DoGet <List <TransactionRequestType> >(url)); }
public GetTransactionRequestsResponse GetTransactionRequests(string bankId, string accountId, string viewId) { var url = TokenStringFormat.Format( URL_GET_TRANSACTION_REQUESTS, new { BankId = bankId, AccountId = accountId, ViewId = viewId }); return(this.DoGet <GetTransactionRequestsResponse>(url)); }
public void AnswerTransactionRequestChallenge(string bankId, string accountId, string viewId, string transactionRequestType, string transactionRequestId, AnswerTransactionRequestChallenge request) { var url = TokenStringFormat.Format( URL_CREATE_TRANSACTION_REQUEST, new { BankId = bankId, AccountId = accountId, ViewId = viewId, TransactionRequestType = transactionRequestType }); // return this.DoPost<TransactionRequest>(url, content: request); }
public Transaction GetTransactionById(string bankId, string accountId, string viewId, string transactionId) { var url = TokenStringFormat.Format( URL_GET_TRANSACTION_BY_ID, new { BankId = bankId, AccountId = accountId, ViewId = viewId, TransactionId = transactionId }); return(this.DoGet <Transaction>(url)); }
public void Login(string username, string password, string consumerKey) { var authorizationValue = TokenStringFormat.Format( HEADER_AUTHORIZATION, new { Username = username, Password = password, ConsumerKey = consumerKey }); var headers = new Dictionary <string, string> { { "Authorization", authorizationValue } }; var response = this.DoPost <LoginResponse>(URL_LOGINS_DIRECT, headers: headers); this.token = response.Token; }
public void Consume(GetSampleMessagesList message) { var sampleMessages = this.ApiClient.GetSampleMessages(message.StartIndex, message.NumberOfItems); this.ServiceBus.Publish(new GetSampleMessagesListResult { CorrelationId = message.CorrelationId, StartIndex = message.StartIndex, NumberOfItems = message.NumberOfItems, Result = sampleMessages }); this.Log.Info( TokenStringFormat.Format( "GetSampleMessagesList: {CorrelationId}.", message)); }
public static string Render(string format, Dictionary <string, object> dictionary) { // получили лист всех имеющихся в формате подстановок IEnumerable <string> tokens; TokenStringFormat.TokenizeString(format, out tokens); var list = (List <string>)tokens; // все, что требуется, но не содержится в словаре var required = list.Where(x => !dictionary.ContainsKey(x)).Select(x => x).ToList(); // добавили в словарь то, что требуется, но чего нет foreach (var r in required) { dictionary.Add(r, null); } return(TokenStringFormat.Format(format, dictionary)); }
public TransactionRequest CreateTransactionRequest( string bankId, string accountId, string viewId, string transactionRequestType, CreateTransactionRequestRequest request) { var url = TokenStringFormat.Format( URL_CREATE_TRANSACTION_REQUEST, new { BankId = bankId, AccountId = accountId, ViewId = viewId, TransactionRequestType = transactionRequestType }); return(this.DoPost <TransactionRequest>(url, content: request)); }
public static string FormatWith(this string format, object values) { return(TokenStringFormat.Format(format, values)); }