public async void RetrievesTransactions() { KontomatikApi api = await LoginWithMockCredentials(); string transactions = await api.GetTransactionsXml("PL05114020170000400213015148", new DateTime(2000, 1, 1)); Assert.Contains("<kind>PRZELEW ZEWNĘTRZNY</kind>", transactions); }
private async Task runCommand(Dictionary <string, string> commandInfo, KontomatikApi api) { string Id = commandInfo["id"]; string apiResponse = ""; string commandName = GetCommandName(Id); try { switch (commandName) { case "ImportOwnerDetails": apiResponse = await api.GetOwnerDetailsXml(); break; case "ImportAccounts": apiResponse = await api.GetAccountsXml(); break; case "ImportTransactions": apiResponse = await api.GetTransactionsXml(commandInfo["iban"], Convert.ToDateTime(commandInfo["since"])); break; case "FinHealthIndicator": apiResponse = await api.GetFinHealthIndicatorXml(); break; default: this.SendToClient(Id, "", "Unrecognized command: " + Id); break; } if (!String.IsNullOrEmpty(apiResponse)) { this.SendToClient(Id, apiResponse, null); } } catch (KontomatikException exception) { this.SendToClient(Id, "", exception.Message); } }