diff --git a/Hexio.EconomicClient.Tests/Hexio.EconomicClient.Tests.csproj b/Hexio.EconomicClient.Tests/Hexio.EconomicClient.Tests.csproj index e915a60..9941e8c 100644 --- a/Hexio.EconomicClient.Tests/Hexio.EconomicClient.Tests.csproj +++ b/Hexio.EconomicClient.Tests/Hexio.EconomicClient.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net5.0 Hexio.EconomicClient.Test @@ -10,13 +10,13 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Hexio.EconomicClient/EconomicModule.cs b/Hexio.EconomicClient/EconomicModule.cs new file mode 100644 index 0000000..93b6d90 --- /dev/null +++ b/Hexio.EconomicClient/EconomicModule.cs @@ -0,0 +1,20 @@ +using Autofac; + +namespace Hexio.EconomicClient +{ + public class EconomicModule : Module + { + private EconomicSettings Settings { get; set; } + + public EconomicModule(EconomicSettings settings) + { + Settings = settings; + } + + protected override void Load(ContainerBuilder builder) + { + builder.Register(c => Settings); + builder.Register(c => EconomicClientFactory.Execute(Settings.AppSecretToken, Settings.AgreementGrantToken)).AsImplementedInterfaces().InstancePerLifetimeScope(); + } + } +} \ No newline at end of file diff --git a/Hexio.EconomicClient/Hexio.EconomicClient.csproj b/Hexio.EconomicClient/Hexio.EconomicClient.csproj index 0b4ea5a..20222c8 100644 --- a/Hexio.EconomicClient/Hexio.EconomicClient.csproj +++ b/Hexio.EconomicClient/Hexio.EconomicClient.csproj @@ -5,7 +5,8 @@ - + + diff --git a/Hexio.EconomicClient/ReadModels/InvoiceReadModel.cs b/Hexio.EconomicClient/ReadModels/InvoiceReadModel.cs index c2d976c..cb28f28 100644 --- a/Hexio.EconomicClient/ReadModels/InvoiceReadModel.cs +++ b/Hexio.EconomicClient/ReadModels/InvoiceReadModel.cs @@ -44,13 +44,13 @@ public class Line public long? SortKey { get; set; } public Unit Unit { get; set; } public Product Product { get; set; } - public long? Quantity { get; set; } - public long? UnitNetPrice { get; set; } - public long? DiscountPercentage { get; set; } - public long? UnitCostPrice { get; set; } - public long? TotalNetAmount { get; set; } - public long? MarginInBaseCurrency { get; set; } - public long? MarginPercentage { get; set; } + public decimal? Quantity { get; set; } + public decimal? UnitNetPrice { get; set; } + public decimal? DiscountPercentage { get; set; } + public decimal? UnitCostPrice { get; set; } + public decimal? TotalNetAmount { get; set; } + public decimal? MarginInBaseCurrency { get; set; } + public decimal? MarginPercentage { get; set; } } public class Product