File size: 2,576 Bytes
351d054
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from pydantic import ValidationError
from app import TransactionData  # Reuse model from app.py
import json

# Example JSON input (update as needed)
sample_input = {
    "Transaction_Id": "T123456789",
    "Hit_Seq": 1,
    "Hit_Id_List": "HIT001",
    "Origin": "USA",
    "Designation": "Manager",
    "Keywords": "Payment",
    "Name": "John Doe",
    "SWIFT_Tag": "TAG001",
    "Currency": "USD",
    "Entity": "CompanyX",
    "Message": "This is a test message",
    "City": "New York",
    "Country": "USA",
    "State": "NY",
    "Hit_Type": "Name Match",
    "Record_Matching_String": "Matching String Example",
    "WatchList_Match_String": "Watchlist Match Example",
    "Payment_Sender_Name": "Alice",
    "Payment_Reciever_Name": "Bob",
    "Swift_Message_Type": "MT103",
    "Text_Sanction_Data": "Sanction text here",
    "Matched_Sanctioned_Entity": "Entity XYZ",
    "Is_Match": 1,
    "Red_Flag_Reason": "High Risk",
    "Risk_Level": "High",
    "Risk_Score": 85.0,
    "Risk_Score_Description": "High Risk Score",
    "CDD_Level": "Enhanced",
    "PEP_Status": "No",
    "Value_Date": "2023-10-01",
    "Last_Review_Date": "2023-11-01",
    "Next_Review_Date": "2024-11-01",
    "Sanction_Description": "Some sanctions",
    "Checker_Notes": "Verified manually",
    "Sanction_Context": "Transaction under review",
    "Maker_Action": "Escalated",
    "Customer_ID": 1001,
    "Customer_Type": "Corporate",
    "Industry": "Finance",
    "Transaction_Date_Time": "2023-10-01T12:00:00",
    "Transaction_Type": "Transfer",
    "Transaction_Channel": "Online",
    "Originating_Bank": "Bank A",
    "Beneficiary_Bank": "Bank B",
    "Geographic_Origin": "USA",
    "Geographic_Destination": "UK",
    "Match_Score": 0.95,
    "Match_Type": "Fuzzy",
    "Sanctions_List_Version": "v2023.10",
    "Screening_Date_Time": "2023-10-01T10:00:00",
    "Risk_Category": "Fraud",
    "Risk_Drivers": "Transaction Volume",
    "Alert_Status": "Open",
    "Investigation_Outcome": "Pending",
    "Case_Owner_Analyst": "Analyst1",
    "Escalation_Level": "Level 2",
    "Escalation_Date": "2023-10-02",
    "Regulatory_Reporting_Flags": True,
    "Audit_Trail_Timestamp": "2023-10-01T10:15:00",
    "Source_Of_Funds": "Internal",
    "Purpose_Of_Transaction": "Loan Repayment",
    "Beneficial_Owner": "OwnerX",
    "Sanctions_Exposure_History": False
}

if __name__ == "__main__":
    try:
        validated = TransactionData(**sample_input)
        print(" Input is valid.")
    except ValidationError as e:
        print(" Validation failed:")
        print(e.json())