From 794b07b0c481fdbf6899cd375fdd71f95f304de9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:39:17 +0000 Subject: [PATCH 1/2] Initial plan From 6061fe77377e28756a09fb4af0adfb3bbf8e5563 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:44:54 +0000 Subject: [PATCH 2/2] Fix Address constructor parameter count: remove 9-param private ctor, use init properties with private parameterless ctor Agent-Logs-Url: https://github.com/TransactionProcessing/TransactionProcessor/sessions/932def28-b9bc-4f06-8c08-6ff9363f2ca4 Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com> --- .../Merchant/Address.cs | 52 ++++++++----------- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/TransactionProcessor.Models/Merchant/Address.cs b/TransactionProcessor.Models/Merchant/Address.cs index 9a3a0680..2fef5ebc 100644 --- a/TransactionProcessor.Models/Merchant/Address.cs +++ b/TransactionProcessor.Models/Merchant/Address.cs @@ -4,36 +4,17 @@ namespace TransactionProcessor.Models.Merchant { public record Address { - public Guid AddressId { get; } - public String AddressLine1 { get; } - public String? AddressLine2 { get; } - public String? AddressLine3 { get; } - public String? AddressLine4 { get; } - public String Town { get; } - public String? Region { get; } - public String PostalCode { get; } - public String Country { get; } + public Guid AddressId { get; init; } + public String AddressLine1 { get; init; } + public String? AddressLine2 { get; init; } + public String? AddressLine3 { get; init; } + public String? AddressLine4 { get; init; } + public String Town { get; init; } + public String? Region { get; init; } + public String PostalCode { get; init; } + public String Country { get; init; } - private Address(Guid addressId, - String addressLine1, - String? addressLine2, - String? addressLine3, - String? addressLine4, - String town, - String? region, - String postalCode, - String country) - { - AddressId = addressId; - AddressLine1 = addressLine1; - AddressLine2 = addressLine2; - AddressLine3 = addressLine3; - AddressLine4 = addressLine4; - Town = town; - Region = region; - PostalCode = postalCode; - Country = country; - } + private Address() { } public static Address Create(Guid addressId, String addressLine1, @@ -57,7 +38,18 @@ public static Address Create(Guid addressId, if (String.IsNullOrWhiteSpace(country)) throw new ArgumentException("Country is required"); - return new Address(addressId, addressLine1, addressLine2, addressLine3, addressLine4,town, region, postalCode, country); + return new Address + { + AddressId = addressId, + AddressLine1 = addressLine1, + AddressLine2 = addressLine2, + AddressLine3 = addressLine3, + AddressLine4 = addressLine4, + Town = town, + Region = region, + PostalCode = postalCode, + Country = country + }; } } } \ No newline at end of file