Adds code
This commit is contained in:
commit
fbc41da444
15 changed files with 208 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
obj
|
||||
.idea
|
||||
|
||||
16
FinTSTest.sln
Normal file
16
FinTSTest.sln
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinTSTest", "FinTSTest\FinTSTest.csproj", "{78E9EBE8-0CB3-4A31-8801-BD7035914000}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{78E9EBE8-0CB3-4A31-8801-BD7035914000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{78E9EBE8-0CB3-4A31-8801-BD7035914000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{78E9EBE8-0CB3-4A31-8801-BD7035914000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{78E9EBE8-0CB3-4A31-8801-BD7035914000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
14
FinTSTest/FinTSTest.csproj
Normal file
14
FinTSTest/FinTSTest.csproj
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="libfintx.FinTS" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
40
FinTSTest/Program.cs
Normal file
40
FinTSTest/Program.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
// See https://aka.ms/new-console-template for more information
|
||||
|
||||
using libfintx.FinTS;
|
||||
using libfintx.FinTS.Data;
|
||||
using libfintx.Swift;
|
||||
|
||||
FinTsClient client = new FinTsClient(
|
||||
new ConnectionDetails()
|
||||
{
|
||||
Url = Environment.GetEnvironmentVariable("FINTS_URL"),
|
||||
UserId = Environment.GetEnvironmentVariable("FINTS_USER"),
|
||||
Pin = Environment.GetEnvironmentVariable("FINTS_PASS"),
|
||||
Blz = int.Parse(Environment.GetEnvironmentVariable("FINTS_BLZ") ?? "0"),
|
||||
CustomerSystemId = Environment.GetEnvironmentVariable("FINTS_CUSTOMER_ID"),
|
||||
Bic = Environment.GetEnvironmentVariable("FINTS_BIC")
|
||||
}
|
||||
);
|
||||
// The initial syncronization is important, otherwise you don't get any data, when using the "CustomerSystemId".
|
||||
await client.Synchronization();
|
||||
|
||||
// Only supports PushTAN
|
||||
TANDialog dialog = new TANDialog(tanDialog => Task.FromResult(""));
|
||||
|
||||
HBCIDialogResult<List<AccountInformation>>? data = await client.Accounts(dialog);
|
||||
|
||||
if (!data.IsSuccess)
|
||||
{
|
||||
Console.WriteLine("Failed to get the account information!");
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
foreach (AccountInformation accountInformation in data.Data)
|
||||
{
|
||||
client.activeAccount = accountInformation;
|
||||
HBCIDialogResult<AccountBalance> balance = await client.Balance(dialog);
|
||||
// This takes a while... so use some worker or other asynchronous system to gather transactions
|
||||
HBCIDialogResult<List<SwiftStatement>> transactions = await client.Transactions(dialog, DateTime.Today.Subtract(new TimeSpan(1)), DateTime.Now);
|
||||
|
||||
Console.WriteLine($"{accountInformation.AccountType} - {balance.Data.Balance}");
|
||||
}
|
||||
BIN
FinTSTest/bin/Debug/net8.0/FinTSTest
Executable file
BIN
FinTSTest/bin/Debug/net8.0/FinTSTest
Executable file
Binary file not shown.
116
FinTSTest/bin/Debug/net8.0/FinTSTest.deps.json
Normal file
116
FinTSTest/bin/Debug/net8.0/FinTSTest.deps.json
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v8.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"FinTSTest/1.0.0": {
|
||||
"dependencies": {
|
||||
"libfintx.FinTS": "1.2.0"
|
||||
},
|
||||
"runtime": {
|
||||
"FinTSTest.dll": {}
|
||||
}
|
||||
},
|
||||
"libfintx.FinTS/1.2.0": {
|
||||
"dependencies": {
|
||||
"libfintx.Globals": "1.2.0",
|
||||
"libfintx.Logger": "1.2.0",
|
||||
"libfintx.Sepa": "1.2.0",
|
||||
"libfintx.Swift": "1.2.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/libfintx.FinTS.dll": {
|
||||
"assemblyVersion": "1.2.0.0",
|
||||
"fileVersion": "1.2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"libfintx.Globals/1.2.0": {
|
||||
"runtime": {
|
||||
"lib/net8.0/libfintx.Globals.dll": {
|
||||
"assemblyVersion": "1.2.0.0",
|
||||
"fileVersion": "1.2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"libfintx.Logger/1.2.0": {
|
||||
"dependencies": {
|
||||
"libfintx.Globals": "1.2.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/libfintx.Logger.dll": {
|
||||
"assemblyVersion": "1.2.0.0",
|
||||
"fileVersion": "1.2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"libfintx.Sepa/1.2.0": {
|
||||
"dependencies": {
|
||||
"libfintx.Globals": "1.2.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/libfintx.Sepa.dll": {
|
||||
"assemblyVersion": "1.2.0.0",
|
||||
"fileVersion": "1.2.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"libfintx.Swift/1.2.0": {
|
||||
"dependencies": {
|
||||
"libfintx.Logger": "1.2.0"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/net8.0/libfintx.Swift.dll": {
|
||||
"assemblyVersion": "1.2.0.0",
|
||||
"fileVersion": "1.2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"FinTSTest/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"libfintx.FinTS/1.2.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-lreaf+2UxJ1SD3J5OH3e2X55X+vh1ySvuw5l55HkQANp9o5ZsMnjz/tfj0nsJYxxuTXNrJWs8xFVx1hbs6cJag==",
|
||||
"path": "libfintx.fints/1.2.0",
|
||||
"hashPath": "libfintx.fints.1.2.0.nupkg.sha512"
|
||||
},
|
||||
"libfintx.Globals/1.2.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-aeoZY3ZpKSXZMfiC6WcByOwMcOhsZlcbkkTMMtzpyNyjTA7duH77gCT9W9C/S1xZ5Sr9D8/WnQtB80cf/T9D7Q==",
|
||||
"path": "libfintx.globals/1.2.0",
|
||||
"hashPath": "libfintx.globals.1.2.0.nupkg.sha512"
|
||||
},
|
||||
"libfintx.Logger/1.2.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-lmfvD2T81xgPf7uYQqd+fmO3wKTkZ1t0VhhyeFZAs53cctlda/PCol0qW1yA47+KZQTFqGd7j8LkVlcfhxTGVw==",
|
||||
"path": "libfintx.logger/1.2.0",
|
||||
"hashPath": "libfintx.logger.1.2.0.nupkg.sha512"
|
||||
},
|
||||
"libfintx.Sepa/1.2.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-kq12/J7G7Ge2VcIXxrlIDiHshqVaUMs9z88P/q42+xwU351JxoHZN0B4DnT7db/rF/LaIpDxl0kSH2qxQsAdmw==",
|
||||
"path": "libfintx.sepa/1.2.0",
|
||||
"hashPath": "libfintx.sepa.1.2.0.nupkg.sha512"
|
||||
},
|
||||
"libfintx.Swift/1.2.0": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-1iR/HuKIxpoZN7JBlp+jOAy/iMxn+9UKMrb5uus+P+JtUagoC6CENeUvMLDrR1oNgzh3rAOnrVrdIjgv3rXKfQ==",
|
||||
"path": "libfintx.swift/1.2.0",
|
||||
"hashPath": "libfintx.swift.1.2.0.nupkg.sha512"
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
FinTSTest/bin/Debug/net8.0/FinTSTest.dll
Normal file
BIN
FinTSTest/bin/Debug/net8.0/FinTSTest.dll
Normal file
Binary file not shown.
BIN
FinTSTest/bin/Debug/net8.0/FinTSTest.pdb
Normal file
BIN
FinTSTest/bin/Debug/net8.0/FinTSTest.pdb
Normal file
Binary file not shown.
12
FinTSTest/bin/Debug/net8.0/FinTSTest.runtimeconfig.json
Normal file
12
FinTSTest/bin/Debug/net8.0/FinTSTest.runtimeconfig.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net8.0",
|
||||
"framework": {
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "8.0.0"
|
||||
},
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
FinTSTest/bin/Debug/net8.0/libfintx.FinTS.dll
Executable file
BIN
FinTSTest/bin/Debug/net8.0/libfintx.FinTS.dll
Executable file
Binary file not shown.
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Globals.dll
Executable file
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Globals.dll
Executable file
Binary file not shown.
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Logger.dll
Executable file
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Logger.dll
Executable file
Binary file not shown.
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Sepa.dll
Executable file
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Sepa.dll
Executable file
Binary file not shown.
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Swift.dll
Executable file
BIN
FinTSTest/bin/Debug/net8.0/libfintx.Swift.dll
Executable file
Binary file not shown.
7
global.json
Normal file
7
global.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "8.0.0",
|
||||
"rollForward": "latestMinor",
|
||||
"allowPrerelease": false
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue