diff --git a/Directory.Packages.props b/Directory.Packages.props index c9ddcf1..b3de04e 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -14,7 +14,7 @@ - + diff --git a/Source/Licensing/SystemEntitlementsConverter.cs b/Source/Licensing/SystemEntitlementsConverter.cs index 04d84c6..f370c68 100644 --- a/Source/Licensing/SystemEntitlementsConverter.cs +++ b/Source/Licensing/SystemEntitlementsConverter.cs @@ -79,7 +79,7 @@ public Validation Convert( result.CountryCodes.AddRange( entitlements.Countries - .Select(x => x.TwoLetterISORegionName)); + .Select(x => x.PrincipalRegion.TwoLetterISORegionName)); } if (errors.Count > 0) @@ -180,7 +180,7 @@ private Option CreateCountry(string? name, Action addError) } private void ValidateCountryCode(CountryInfo? country, Action addError) - => this.ValidateCountryCode(country?.TwoLetterISORegionName, addError); + => this.ValidateCountryCode(country?.PrincipalRegion.TwoLetterISORegionName, addError); private void ValidateCountryCode(string? code, Action addError) { diff --git a/Tests/Licensing.Test/SystemEntitlementsConverterTests.cs b/Tests/Licensing.Test/SystemEntitlementsConverterTests.cs index 2c2e9e9..d943548 100644 --- a/Tests/Licensing.Test/SystemEntitlementsConverterTests.cs +++ b/Tests/Licensing.Test/SystemEntitlementsConverterTests.cs @@ -81,7 +81,7 @@ public void GivenCountryCode_WhenSystemEntitlementsConverted_Then(string country _ = validation.IfSuccess(x => { _ = Assert.Single(x.CountryCodes); - Assert.Equal(country.TwoLetterISORegionName, x.CountryCodes.Single()); + Assert.Equal(country.PrincipalRegion.TwoLetterISORegionName, x.CountryCodes.Single()); }); }