Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed invoice read model types #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Hexio.EconomicClient.Tests/Hexio.EconomicClient.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Hexio.EconomicClient.Test</RootNamespace>
</PropertyGroup>

Expand All @@ -10,13 +10,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.5" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

Expand Down
20 changes: 20 additions & 0 deletions Hexio.EconomicClient/EconomicModule.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}
3 changes: 2 additions & 1 deletion Hexio.EconomicClient/Hexio.EconomicClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="RestEase" Version="1.6.4" />
<PackageReference Include="Autofac" Version="6.1.0" />
<PackageReference Include="RestEase" Version="1.5.2" />
</ItemGroup>

</Project>
14 changes: 7 additions & 7 deletions Hexio.EconomicClient/ReadModels/InvoiceReadModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading