Skip to content
Merged
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
Expand Up @@ -9,8 +9,8 @@
<ItemGroup>
<PackageReference Include="MediatR" Version="13.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.DynamicLinq" Version="9.6.9" />
<PackageReference Include="Shared" Version="2025.10.2" />
<PackageReference Include="TransactionProcessor.Database" Version="2025.9.1" />
<PackageReference Include="Shared" Version="2025.11.5" />
<PackageReference Include="TransactionProcessor.Database" Version="2025.10.1" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions EstateReportingAPI.Client/EstateReportingAPI.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="2025.10.2" />
<PackageReference Include="ClientProxyBase" Version="2025.11.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="Shared.Results" Version="2025.10.2" />
<PackageReference Include="Shared.Results" Version="2025.11.5" />
</ItemGroup>

<ItemGroup>
Expand Down
408 changes: 113 additions & 295 deletions EstateReportingAPI.Client/EstateReportingApiClient.cs

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions EstateReportingAPI.DataTrasferObjects/CalendarDate.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
namespace EstateReportingAPI.DataTrasferObjects{
using Newtonsoft.Json;
using System;

public class CalendarDate
{
[JsonProperty("date")]
public DateTime Date { get; set; }
[JsonProperty("day_of_week")]
public String DayOfWeek{ get; set; }

Check warning on line 10 in EstateReportingAPI.DataTrasferObjects/CalendarDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'DayOfWeek' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 10 in EstateReportingAPI.DataTrasferObjects/CalendarDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'DayOfWeek' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("day_of_week_number")]
public Int32 DayOfWeekNumber{ get; set; }
[JsonProperty("day_of_week_short")]
public String DayOfWeekShort{ get; set; }

Check warning on line 14 in EstateReportingAPI.DataTrasferObjects/CalendarDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'DayOfWeekShort' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("month_name")]
public String MonthName{ get; set; }

Check warning on line 16 in EstateReportingAPI.DataTrasferObjects/CalendarDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'MonthName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("month_name_short")]
public String MonthNameShort { get; set; }

Check warning on line 18 in EstateReportingAPI.DataTrasferObjects/CalendarDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'MonthNameShort' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("month_number")]
public Int32 MonthNumber { get; set; }
[JsonProperty("week_number")]
public Int32 WeekNumber { get; set; }
[JsonProperty("week_number_string")]
public String WeekNumberString { get; set; }

Check warning on line 24 in EstateReportingAPI.DataTrasferObjects/CalendarDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'WeekNumberString' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("year")]
public Int32 Year { get; set; }
[JsonProperty("year_week_number")]
public String YearWeekNumber { get; set; }

Check warning on line 28 in EstateReportingAPI.DataTrasferObjects/CalendarDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'YearWeekNumber' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
}
}
4 changes: 3 additions & 1 deletion EstateReportingAPI.DataTrasferObjects/CalendarYear.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace EstateReportingAPI.DataTrasferObjects
{
public class CalendarYear
{
[JsonProperty("year")]
public Int32 Year{ get; set; }
}
}
4 changes: 4 additions & 0 deletions EstateReportingAPI.DataTrasferObjects/ComparisonDate.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
namespace EstateReportingAPI.DataTrasferObjects{
using Newtonsoft.Json;
using System;

public class ComparisonDate{
[JsonProperty("order_value")]
public Int32 OrderValue{ get; set; }
[JsonProperty("date")]
public DateTime Date { get; set; }
[JsonProperty("description")]
public String Description { get; set; }

Check warning on line 11 in EstateReportingAPI.DataTrasferObjects/ComparisonDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Description' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 11 in EstateReportingAPI.DataTrasferObjects/ComparisonDate.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Description' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
}
}
8 changes: 7 additions & 1 deletion EstateReportingAPI.DataTrasferObjects/LastSettlement.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
namespace EstateReportingAPI.DataTransferObjects{
using Newtonsoft.Json;

namespace EstateReportingAPI.DataTransferObjects{
using System;

public class LastSettlement
{
[JsonProperty("settlement_date")]
public DateTime SettlementDate { get; set; }
[JsonProperty("sales_value")]
public Decimal SalesValue { get; set; }
[JsonProperty("sales_count")]
public Int32 SalesCount { get; set; }
[JsonProperty("fees_value")]
public Decimal FeesValue { get; set; }
}
}
13 changes: 13 additions & 0 deletions EstateReportingAPI.DataTrasferObjects/Merchant.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
namespace EstateReportingAPI.DataTrasferObjects{
using Newtonsoft.Json;
using System;

public class Merchant{
#region Properties

[JsonProperty("created_date_time")]
public DateTime CreatedDateTime{ get; set; }
[JsonProperty("estate_reporting_id")]
public Int32 EstateReportingId{ get; set; }
[JsonProperty("last_sale")]
public DateTime LastSale{ get; set; }
[JsonProperty("last_sale_date_time")]
public DateTime LastSaleDateTime{ get; set; }
[JsonProperty("last_statement")]
public DateTime LastStatement{ get; set; }
[JsonProperty("merchant_id")]
public Guid MerchantId{ get; set; }
[JsonProperty("merchant_reporting_id")]
public Int32 MerchantReportingId{ get; set; }
[JsonProperty("name")]
public String Name{ get; set; }

Check warning on line 23 in EstateReportingAPI.DataTrasferObjects/Merchant.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Name' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("post_code")]
public String PostCode{ get; set; }

Check warning on line 25 in EstateReportingAPI.DataTrasferObjects/Merchant.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'PostCode' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("reference")]
public String Reference{ get; set; }

Check warning on line 27 in EstateReportingAPI.DataTrasferObjects/Merchant.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Reference' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("region")]
public String Region{ get; set; }

Check warning on line 29 in EstateReportingAPI.DataTrasferObjects/Merchant.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Region' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("town")]
public String Town{ get; set; }

Check warning on line 31 in EstateReportingAPI.DataTrasferObjects/Merchant.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Town' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

#endregion
}
Expand Down
6 changes: 5 additions & 1 deletion EstateReportingAPI.DataTrasferObjects/MerchantKpi.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace EstateReportingAPI.DataTransferObjects
{
public class MerchantKpi
{
[JsonProperty("merchants_with_sale_in_last_hour")]
public Int32 MerchantsWithSaleInLastHour{ get; set; }
[JsonProperty("merchants_with_no_sale_today")]
public Int32 MerchantsWithNoSaleToday { get; set; }
[JsonProperty("merchants_with_no_sale_in_last7_days")]
public Int32 MerchantsWithNoSaleInLast7Days { get; set; }
}
}
8 changes: 7 additions & 1 deletion EstateReportingAPI.DataTrasferObjects/Operator.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
namespace EstateReportingAPI.DataTrasferObjects{
using Newtonsoft.Json;

namespace EstateReportingAPI.DataTrasferObjects{
using System;

public class Operator{
[JsonProperty("estate_reporting_id")]
public Int32 EstateReportingId { get; set; }
[JsonProperty("operator_id")]
public Guid OperatorId{ get; set; }
[JsonProperty("name")]
public String Name { get; set; }

Check warning on line 12 in EstateReportingAPI.DataTrasferObjects/Operator.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Name' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 12 in EstateReportingAPI.DataTrasferObjects/Operator.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Name' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("operator_reporting_id")]
public Int32 OperatorReportingId { get; set; }
}
}
3 changes: 3 additions & 0 deletions EstateReportingAPI.DataTrasferObjects/ResponseCode.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
namespace EstateReportingAPI.DataTrasferObjects{
using Newtonsoft.Json;
using System;

public class ResponseCode{
[JsonProperty("code")]
public Int32 Code { get; set; }
[JsonProperty("description")]
public String Description { get; set; }

Check warning on line 9 in EstateReportingAPI.DataTrasferObjects/ResponseCode.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Description' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 9 in EstateReportingAPI.DataTrasferObjects/ResponseCode.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'Description' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
}
}
9 changes: 8 additions & 1 deletion EstateReportingAPI.DataTrasferObjects/TodaysSales.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace EstateReportingAPI.DataTransferObjects
{
public class TodaysSales
{
[JsonProperty("todays_average_sales_value")]
public Decimal TodaysAverageSalesValue { get; set; }
[JsonProperty("todays_sales_value")]
public Decimal TodaysSalesValue { get; set; }
[JsonProperty("todays_sales_count")]
public Int32 TodaysSalesCount { get; set; }
[JsonProperty("comparison_sales_value")]
public Decimal ComparisonSalesValue { get; set; }
[JsonProperty("comparison_sales_count")]
public Int32 ComparisonSalesCount { get; set; }
[JsonProperty("comparison_average_sales_value")]
public Decimal ComparisonAverageSalesValue { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
namespace EstateReportingAPI.DataTransferObjects{
using Newtonsoft.Json;
using System;

public class TodaysSalesCountByHour
{
[JsonProperty("hour")]
public Int32 Hour { get; set; }
[JsonProperty("todays_sales_count")]
public Int32 TodaysSalesCount { get; set; }
public Decimal ComparisonSalesValue { get; set; }
[JsonProperty("comparison_sales_count")]
public Int32 ComparisonSalesCount { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
namespace EstateReportingAPI.DataTransferObjects{
using Newtonsoft.Json;
using System;

public class TodaysSalesValueByHour{
[JsonProperty("hour")]
public Int32 Hour{ get; set; }
[JsonProperty("todays_sales_value")]
public Decimal TodaysSalesValue { get; set; }
[JsonProperty("comparison_sales_value")]
public Decimal ComparisonSalesValue { get; set; }
}
}
9 changes: 9 additions & 0 deletions EstateReportingAPI.DataTrasferObjects/TodaysSettlement.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
namespace EstateReportingAPI.DataTransferObjects{
using Newtonsoft.Json;
using System;

public class TodaysSettlement
{
[JsonProperty("todays_settlement_value")]
public Decimal TodaysSettlementValue { get; set; }
[JsonProperty("todays_pending_settlement_value")]
public Decimal TodaysPendingSettlementValue { get; set; }
[JsonProperty("todays_settlement_count")]
public Int32 TodaysSettlementCount { get; set; }
[JsonProperty("todays_pending_settlement_count")]
public Int32 TodaysPendingSettlementCount { get; set; }
[JsonProperty("comparison_settlement_value")]
public Decimal ComparisonSettlementValue { get; set; }
[JsonProperty("comparison_pending_settlement_value")]
public Decimal ComparisonPendingSettlementValue { get; set; }
[JsonProperty("comparison_settlement_count")]
public Int32 ComparisonSettlementCount { get; set; }
[JsonProperty("comparison_pending_settlement_count")]
public Int32 ComparisonPendingSettlementCount { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
namespace EstateReportingAPI.DataTransferObjects{
using Newtonsoft.Json;
using System;

public class TopBottomMerchantData
{
[JsonProperty("merchant_name")]
public String MerchantName { get; set; }
[JsonProperty("sales_value")]
public Decimal SalesValue { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
namespace EstateReportingAPI.DataTransferObjects{
using Newtonsoft.Json;
using System;

public class TopBottomOperatorData
{
[JsonProperty("operator_name")]
public String OperatorName { get; set; }
[JsonProperty("sales_value")]
public Decimal SalesValue { get; set; }
}
}
3 changes: 3 additions & 0 deletions EstateReportingAPI.DataTrasferObjects/TopBottomProductData.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
namespace EstateReportingAPI.DataTransferObjects{
using Newtonsoft.Json;
using System;

public class TopBottomProductData
{
[JsonProperty("product_name")]
public String ProductName { get; set; }
[JsonProperty("sales_value")]
public Decimal SalesValue { get; set; }
}
}
6 changes: 5 additions & 1 deletion EstateReportingAPI.DataTrasferObjects/UnsettledFee.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace EstateReportingAPI.DataTransferObjects
{
public class UnsettledFee
{
[JsonProperty("dimension_name")]
public String DimensionName { get; set; }

Check warning on line 11 in EstateReportingAPI.DataTrasferObjects/UnsettledFee.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'DimensionName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 11 in EstateReportingAPI.DataTrasferObjects/UnsettledFee.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

Non-nullable property 'DimensionName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.
[JsonProperty("fees_value")]
public Decimal FeesValue { get; set; }
[JsonProperty("fees_count")]
public Int32 FeesCount { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

foreach (DateTime date in datesInYear.Where(d => d <= DateTime.Now.Date).ToList())
{
CalendarDate? x = dates.SingleOrDefault(d => d.Date == date);

Check warning on line 95 in EstateReportingAPI.IntegrationTests/DimensionControllerTests.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
x.ShouldNotBeNull();
}
}
Expand Down Expand Up @@ -216,7 +216,7 @@
var result = await ApiClient.GetOperators(string.Empty, this.TestId, CancellationToken.None);
result.IsSuccess.ShouldBeTrue();

var operators = result.Data;
List<Operator> operators = result.Data;
operators.ShouldNotBeNull();
operators.Count.ShouldBe(3);
var operator1 = operators.SingleOrDefault(o => o.Name == "Operator1");
Expand Down Expand Up @@ -275,7 +275,7 @@

}

public void Dispose()

Check warning on line 278 in EstateReportingAPI.IntegrationTests/DimensionControllerTests.cs

View workflow job for this annotation

GitHub Actions / Build and Test Pull Requests

'DimensionsControllerTests.Dispose()' hides inherited member 'ControllerTestsBase.Dispose()'. Use the new keyword if hiding was intended.
{
EstateManagementContext context = new EstateManagementContext(GetLocalConnectionString($"EstateReportingReadModel{TestId.ToString()}"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="TransactionProcessor.Database" Version="2025.9.1" />
<PackageReference Include="TransactionProcessor.Database" Version="2025.10.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
Expand All @@ -21,13 +21,13 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="Shared" Version="2025.10.2" />
<PackageReference Include="Shared.Logger" Version="2025.10.2" />
<PackageReference Include="Shared.IntegrationTesting" Version="2025.10.2" />
<PackageReference Include="Shared" Version="2025.11.5" />
<PackageReference Include="Shared.Logger" Version="2025.11.5" />
<PackageReference Include="Shared.IntegrationTesting" Version="2025.11.5" />
<PackageReference Include="Ductus.FluentDocker" Version="2.85.0" />
<PackageReference Include="NLog" Version="6.0.5" />
<PackageReference Include="NLog.Extensions.Logging" Version="6.0.5" />
<PackageReference Include="SecurityService.Client" Version="2025.8.1" />
<PackageReference Include="SecurityService.Client" Version="2025.10.1" />
<PackageReference Include="Lamar" Version="15.0.1" />
<PackageReference Include="Lamar.Microsoft.DependencyInjection" Version="15.0.1" />

Expand Down
4 changes: 2 additions & 2 deletions EstateReportingAPI.Tests/EstateReportingAPI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<DebugType>None</DebugType>
<DebugType>Full</DebugType>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -19,7 +19,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="TransactionProcessor.Database" Version="2025.9.1" />
<PackageReference Include="TransactionProcessor.Database" Version="2025.10.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
Expand Down
Loading
Loading