diff --git a/app/api/schemas/disbursement.py b/app/api/schemas/disbursement.py index 111d84d..b9948bb 100644 --- a/app/api/schemas/disbursement.py +++ b/app/api/schemas/disbursement.py @@ -32,7 +32,7 @@ class DisburseLoanResponseSchema(Schema): countryId = fields.Str(allow_none=True) responseCode = fields.Str(allow_none=True) responseMessage = fields.Str(allow_none=True) - disburseMessage = fields.Str(allow_none=True) + disburseResult = fields.Str(allow_none=True) disburseDate = fields.Str(allow_none=True) disburseVerify = fields.Str(allow_none=True) disburseDescription = fields.Str(allow_none=True) diff --git a/app/api/schemas/transaction_verify.py b/app/api/schemas/transaction_verify.py index af62321..53d614e 100644 --- a/app/api/schemas/transaction_verify.py +++ b/app/api/schemas/transaction_verify.py @@ -18,8 +18,4 @@ class TransactionVerifyResponseSchema(Schema): providedAmount = fields.Float(required=True) collectedAmount = fields.Float(required=True) transactionId = fields.Str(allow_none=True) - transactionType = fields.Str(allow_none=True) - disburseVerify = fields.Str(allow_none=True) - verifyDescription = fields.Str(allow_none=True) - verifyResult = fields.Str(allow_none=True) - \ No newline at end of file + transactionType = fields.Str(allow_none=True) \ No newline at end of file diff --git a/app/api/services/disbursement.py b/app/api/services/disbursement.py index bb64ee0..b5a87ac 100644 --- a/app/api/services/disbursement.py +++ b/app/api/services/disbursement.py @@ -40,6 +40,9 @@ class DisbursementService: "countryId": validated_data.get("countryId"), "responseCode": "00", # success code example "responseMessage": "Loan Request Completed Successfully!", + "disburseVerify": datetime.datetime.now().isoformat(), + "verifyResult": "00", + "verifyDescription": "Collect Status retrieved successfully.", "disburseDate": datetime.datetime.now().isoformat(), "disburseResult": "00", "disburseDescription": "Loan Request Completed Successfully!", diff --git a/app/api/services/transaction_verify.py b/app/api/services/transaction_verify.py index ae9d247..b0e4c40 100644 --- a/app/api/services/transaction_verify.py +++ b/app/api/services/transaction_verify.py @@ -6,7 +6,6 @@ from app.api.schemas.transaction_verify import ( TransactionVerifySchema, TransactionVerifyResponseSchema ) -import datetime class TransactionVerifyService: @@ -38,10 +37,7 @@ class TransactionVerifyService: "providedAmount": 0.0, "collectedAmount": 7.50, "transactionId": validated_data.get("transactionId"), - "transactionType": validated_data.get("transactionType"), - "disburseVerify": datetime.datetime.now().isoformat(), - "verifyResult": "00", - "verifyDescription": "Collect Status retrieved successfully.", + "transactionType": validated_data.get("transactionType") } # Validate and serialize response with TransactionVerifyResponseSchema diff --git a/app/swagger/schemas/DisbursementResponse.json b/app/swagger/schemas/DisbursementResponse.json index 16e2c7b..9f4c0c8 100644 --- a/app/swagger/schemas/DisbursementResponse.json +++ b/app/swagger/schemas/DisbursementResponse.json @@ -86,6 +86,22 @@ "type": "string", "example": "Loan Request Completed Successfully!", "nullable": true + }, + "disburseVerify": { + "type": "string", + "format": "date-time", + "example": "2023-10-01T12:00:00Z", + "nullable": true + }, + "verifyResult": { + "type": "string", + "example": "00", + "nullable": true + }, + "verifyDescription": { + "type": "string", + "example": "Collect Status retrieved successfully.", + "nullable": true } }, "required": [ diff --git a/app/swagger/schemas/TransactionVerifyResponse.json b/app/swagger/schemas/TransactionVerifyResponse.json index 6a687b8..d1b17db 100644 --- a/app/swagger/schemas/TransactionVerifyResponse.json +++ b/app/swagger/schemas/TransactionVerifyResponse.json @@ -38,20 +38,6 @@ "transactionType": { "type": "string", "example": "Disbursement" - }, - "disburseVerify":{ - "type": "string", - "format": "date-time", - "example": "2023-10-01T12:00:00Z", - "nullable": true - }, - "verifyResult": { - "type": "string", - "example": "Success" - }, - "verifyDescription": { - "type": "string", - "example": "Disbursement was verified and collection completed." } }, "required": [