diff --git a/block.py b/block.py index 7baa8cc..cbe3bce 100644 --- a/block.py +++ b/block.py @@ -101,6 +101,7 @@ def __main__( payfrequency: str, monthsatresidence: str, state: str, + zip: str, #thxresponse-> EventType: str, DigitalIdConfidence: str, @@ -129,6 +130,7 @@ def __main__( "payfrequency" : payfrequency, "monthsatresidence" : monthsatresidence, "state" : state, + "zip" : zip, "EventType" : EventType, "DigitalIdConfidence" : DigitalIdConfidence, "RiskRating" : RiskRating, @@ -171,7 +173,8 @@ def __main__( logger.info(result) # State Check state_value = combined_df["state"].iloc[0] - if pd.notnull(state_value) and state_value == "ZZ": + zip_value = combined_df["zip"].iloc[0] + if (pd.notnull(state_value) and state_value == "ZZ") or (pd.notnull(zip_value) and zip_value == "86445"): result["hd_score_m1"] = 1250 logger.info("post_processed_data after state check") logger.info(result) diff --git a/request_schema.json b/request_schema.json index 9fc2039..aa36ec4 100644 --- a/request_schema.json +++ b/request_schema.json @@ -93,6 +93,10 @@ "state": { "type": ["string", "null"], "description": "State of the current residence." + }, + "zip": { + "type": ["string", "null"], + "description": "Zip of the current residence." } }, "required": [] diff --git a/test_block.py b/test_block.py index d866241..b233b6a 100644 --- a/test_block.py +++ b/test_block.py @@ -27,7 +27,8 @@ input_json = { "lengthatbank": None, "educationlevel": None, "monthsatresidence": None, - "state": None + "state": None, + "zip": None }