From 0a65b10b586122b34eba32a339119293c5e670be Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 23 Oct 2024 13:51:32 -0700 Subject: [PATCH] Deprecate Factors subscores --- MaxMind.MinFraud/Response/Factors.cs | 6 +++++- MaxMind.MinFraud/Response/Subscores.cs | 4 +++- releasenotes.md | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/MaxMind.MinFraud/Response/Factors.cs b/MaxMind.MinFraud/Response/Factors.cs index dbccb26..deafbd5 100644 --- a/MaxMind.MinFraud/Response/Factors.cs +++ b/MaxMind.MinFraud/Response/Factors.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Text.Json.Serialization; namespace MaxMind.MinFraud.Response @@ -24,6 +25,7 @@ public sealed class Factors : Insights /// risk score. /// [JsonPropertyName("subscores")] + [Obsolete("Replaced by RiskScoreReasons")] public Subscores Subscores { get; init; } = new Subscores(); /// @@ -32,7 +34,9 @@ public sealed class Factors : Insights /// A string that represents the current object. public override string ToString() { +#pragma warning disable 0618 return $"{base.ToString()}, Subscores: {Subscores}, RiskScoreReasons: {RiskScoreReasons}"; +#pragma warning restore 0618 } } } diff --git a/MaxMind.MinFraud/Response/Subscores.cs b/MaxMind.MinFraud/Response/Subscores.cs index 5c16dbc..00a5600 100644 --- a/MaxMind.MinFraud/Response/Subscores.cs +++ b/MaxMind.MinFraud/Response/Subscores.cs @@ -1,4 +1,5 @@ -using System.Text.Json.Serialization; +using System; +using System.Text.Json.Serialization; namespace MaxMind.MinFraud.Response { @@ -6,6 +7,7 @@ namespace MaxMind.MinFraud.Response /// This class contains scores for many of the individual risk /// factors that are used to calculate the overall risk score. /// + [Obsolete("Replaced by RiskScoreReason")] public sealed class Subscores { /// diff --git a/releasenotes.md b/releasenotes.md index d0afc0d..04e0e1d 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,6 +1,13 @@ Release Notes ============= +5.1.0 +------------------------- + +* The minFraud Factors subscores have been deprecated. They will be removed + in March 2025. Please see [our release notes](https://dev.maxmind.com/minfraud/release-notes/2024/#deprecation-of-risk-factor-scoressubscores) + for more information. + 5.1.0-beta.1 (2024-09-06) -------------------------