Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>default</LangVersion>
<Nullable>enable</Nullable>
Expand All @@ -10,7 +10,7 @@

<PackageId>BaseLinker.Extensions.DependencyInjection</PackageId>
<Description>BaseLinker.com API client library (dependency injection extensions)</Description>
<PackageVersion>0.2.6</PackageVersion>
<Version>0.5.2.3</Version>
<PackageTags>ecommerce;e-commerce;baselinker</PackageTags>
<RepositoryUrl>https://github.com/bugproof/BaseLinkerApi</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand All @@ -19,8 +19,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.5" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions BaseLinkerApi.Tests/BaseLinkerApi.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.0.2">
<PackageReference Include="coverlet.collector" Version="8.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
13 changes: 8 additions & 5 deletions BaseLinkerApi/BaseLinkerApi.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0;net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net10.0;netstandard2.0</TargetFrameworks>
<LangVersion>default</LangVersion>
<Nullable>annotations</Nullable>

<AssemblyName>BaseLinker</AssemblyName>

<PackageId>BaseLinker</PackageId>
<Description>Base.com API client library</Description>
<PackageVersion>0.5.2</PackageVersion>
<Version>0.5.2.3</Version>
<PackageTags>ecommerce;e-commerce;baselinker</PackageTags>
<RepositoryUrl>https://github.com/bugproof/baselinker-dotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand All @@ -18,9 +18,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Net.Http.Json" Version="7.0.1" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="System.Text.Json" Version="7.0.2" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="System.Threading.RateLimiting" Version="7.0.0" />
<PackageReference Include="System.Threading.RateLimiting" Version="10.0.5" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Net.Http.Json" Version="10.0.5" />
<PackageReference Include="System.Text.Json" Version="10.0.5" />
</ItemGroup>

</Project>
27 changes: 26 additions & 1 deletion BaseLinkerApi/Requests/Orders/GetInvoices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,17 @@ public class GetInvoices : IRequest<GetInvoices.Response>
public int? SeriesId { get; set; }

/// <summary>
/// (optional, true by default) Download external invoices as well.
/// (optional) If set to 'false' then omits from the results invoices that already have an external invoice file uploaded by addOrderInvoiceFile method (useful for ERP integrations uploading invoice files to BaseLinker)
/// </summary>
[JsonPropertyName("get_external_invoices")]
public bool? GetExternalInvoices { get; set; }

/// <summary>
/// (optional) If set to 'true' then includes government data fields in the response: gov_id, gov_date, gov_status.
/// </summary>
[JsonPropertyName("get_government_data")]
public bool? GetGovernmentData { get; set; }

public class Response : ResponseBase
{
public class Item
Expand Down Expand Up @@ -187,6 +193,25 @@ public class Invoice

[JsonPropertyName("items")]
public List<Item> Items { get; set; }

/// <summary>
/// Government invoice identifier (returned when get_government_data is true).
/// </summary>
[JsonPropertyName("gov_id")]
public string GovId { get; set; }

/// <summary>
/// Government invoice date in Unix time format (returned when get_government_data is true).
/// </summary>
[JsonPropertyName("gov_date")]
[JsonConverter(typeof(UnixDateTimeOffsetConverter))]
public DateTimeOffset? GovDate { get; set; }

/// <summary>
/// Government invoice status: 1 = Sent, 2 = Accepted, 3 = Rejected, 5 = Offline mode (returned when get_government_data is true).
/// </summary>
[JsonPropertyName("gov_status")]
public int? GovStatus { get; set; }

/// <summary>
/// Additional not parsed data
Expand Down
2 changes: 1 addition & 1 deletion ExampleConsoleApp/ExampleConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>default</LangVersion>
</PropertyGroup>

Expand Down