diff --git a/HISTORY.rst b/HISTORY.rst index f194dcd..ffa55e5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,8 @@ History linking. * Added ``banquest``, ``fat_zebra``, ``summit_payments``, and ``yaadpay`` to the ``/payment/processor`` validation. +* Added ``clear`` to the valid values for the ``tag`` parameter on the + Report Transaction API. * The version is now retrieved from package metadata at runtime using ``importlib.metadata``. This reduces the chance of version inconsistencies during releases. diff --git a/src/minfraud/validation.py b/src/minfraud/validation.py index e206920..18d7a1b 100644 --- a/src/minfraud/validation.py +++ b/src/minfraud/validation.py @@ -408,7 +408,7 @@ def _maxmind_id(s: str | None) -> str: raise ValueError -_tag = In(["chargeback", "not_fraud", "spam_or_abuse", "suspected_fraud"]) +_tag = In(["chargeback", "clear", "not_fraud", "spam_or_abuse", "suspected_fraud"]) def _uuid(s: str) -> str: diff --git a/tests/test_validation.py b/tests/test_validation.py index e89a21d..30e77ad 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -470,7 +470,13 @@ def test_strings(self) -> None: self.check_report_str_type(key) def test_tag(self) -> None: - for good in ("chargeback", "not_fraud", "spam_or_abuse", "suspected_fraud"): + for good in ( + "chargeback", + "clear", + "not_fraud", + "spam_or_abuse", + "suspected_fraud", + ): self.check_report({"tag": good}) for bad in ("risky_business", "", None): self.check_invalid_report({"tag": bad})