Skip to content

Commit 59bb680

Browse files
committed
Use internal naming convention
1 parent 697c148 commit 59bb680

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

minfraud/validation.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def _transaction_id(s: Optional[str]) -> str:
385385
raise ValueError
386386

387387

388-
validate_report_schema = Schema(
388+
_validate_report_schema = Schema(
389389
{
390390
"chargeback_code": str,
391391
"ip_address": _ip_address,
@@ -398,14 +398,15 @@ def _transaction_id(s: Optional[str]) -> str:
398398
)
399399

400400

401-
def validate_at_least_one_identifier_field(report):
401+
def _validate_at_least_one_identifier_field(report):
402402
optional_fields = ["ip_address", "maxmind_id", "minfraud_id", "transaction_id"]
403403
if not any(field in report for field in optional_fields):
404404
raise ValueError("The report must contain at least one of the following fields: 'ip_address', 'maxmind_id', 'minfraud_id', 'transaction_id'.")
405405
return True
406406

407407

408408
def validate_report(report):
409-
validate_report_schema(report)
410-
validate_at_least_one_identifier_field(report)
409+
_validate_report_schema(report)
410+
_validate_at_least_one_identifier_field(report)
411411
return True
412+

0 commit comments

Comments
 (0)