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
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/minfraud/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 7 additions & 1 deletion tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
Loading