Merge branch 'verify_balance_check' into penal_charge
This commit was merged in pull request #19.
This commit is contained in:
@@ -11,7 +11,8 @@ from app.api.services import (
|
|||||||
TokenValidationService,
|
TokenValidationService,
|
||||||
LienCheckService,
|
LienCheckService,
|
||||||
NewTransactionCheckService,
|
NewTransactionCheckService,
|
||||||
CompleteRACcheckService
|
CompleteRACcheckService,
|
||||||
|
VerifyAccountBalanceService
|
||||||
)
|
)
|
||||||
from app.utils.logger import logger
|
from app.utils.logger import logger
|
||||||
from app.api.middlewares import enforce_json
|
from app.api.middlewares import enforce_json
|
||||||
@@ -59,7 +60,7 @@ def rac_check():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# RACCheck Endpoint
|
# VerifyAccountBalance Endpoint
|
||||||
@api.route('/VerifyAccountBalance', methods=['POST'])
|
@api.route('/VerifyAccountBalance', methods=['POST'])
|
||||||
@jwt_required()
|
@jwt_required()
|
||||||
def verify_account_balance():
|
def verify_account_balance():
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ from app.api.services.lien_check import LienCheckService
|
|||||||
from app.api.services.new_transaction_check import NewTransactionCheckService
|
from app.api.services.new_transaction_check import NewTransactionCheckService
|
||||||
from app.api.services.complete_rac_check_service import CompleteRACcheckService
|
from app.api.services.complete_rac_check_service import CompleteRACcheckService
|
||||||
from app.api.services.generate_token import GenerateTokenService
|
from app.api.services.generate_token import GenerateTokenService
|
||||||
|
from app.api.services.verify_account_balance import VerifyAccountBalanceService
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ class VerifyAccountBalanceService:
|
|||||||
schema = VerifyAccountBalanceSchema()
|
schema = VerifyAccountBalanceSchema()
|
||||||
validated_data = schema.load(data)
|
validated_data = schema.load(data)
|
||||||
|
|
||||||
account_id = validated_data["account_id"]
|
account_id = validated_data["accountId"]
|
||||||
request_id = validated_data["request_id"]
|
request_id = validated_data["requestId"]
|
||||||
amount = validated_data["amount"]
|
amount = validated_data["amount"]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,14 @@
|
|||||||
"url": "https://www.simbrellang.net"
|
"url": "https://www.simbrellang.net"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "VerifyAccountBalance",
|
||||||
|
"description": "Verify Account Balance Request",
|
||||||
|
"externalDocs": {
|
||||||
|
"description": "Find out more",
|
||||||
|
"url": "https://www.simbrellang.net"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "CompleteRACcheck",
|
"name": "CompleteRACcheck",
|
||||||
"description": "Complete Risk Acceptance Criteria Request",
|
"description": "Complete Risk Acceptance Criteria Request",
|
||||||
@@ -127,6 +135,9 @@
|
|||||||
},
|
},
|
||||||
"/api/rac-check": {
|
"/api/rac-check": {
|
||||||
"$ref": "swagger/paths/RACCheck.json"
|
"$ref": "swagger/paths/RACCheck.json"
|
||||||
|
},
|
||||||
|
"/api/VerifyAccountBalance": {
|
||||||
|
"$ref": "swagger/paths/VerifyAccountBalance.json"
|
||||||
},
|
},
|
||||||
"/api/CompleteRACcheck": {
|
"/api/CompleteRACcheck": {
|
||||||
"$ref": "swagger/paths/CompleteRACcheck.json"
|
"$ref": "swagger/paths/CompleteRACcheck.json"
|
||||||
@@ -170,6 +181,12 @@
|
|||||||
"RACCheckResponse": {
|
"RACCheckResponse": {
|
||||||
"$ref": "./schemas/RACCheckResponse.json"
|
"$ref": "./schemas/RACCheckResponse.json"
|
||||||
},
|
},
|
||||||
|
"VerifyAccountBalanceRequest": {
|
||||||
|
"$ref": "./schemas/VerifyAccountBalanceRequest.json"
|
||||||
|
},
|
||||||
|
"VerifyAccountBalanceResponse": {
|
||||||
|
"$ref": "./schemas/VerifyAccountBalanceResponse.json"
|
||||||
|
},
|
||||||
"CompleteRACcheckRequest": {
|
"CompleteRACcheckRequest": {
|
||||||
"$ref": "./schemas/CompleteRACcheckRequest.json"
|
"$ref": "./schemas/CompleteRACcheckRequest.json"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"post": {
|
||||||
|
"tags": [
|
||||||
|
"VerifyAccountBalance"
|
||||||
|
],
|
||||||
|
"summary": "Risk Acceptance Criteria Check",
|
||||||
|
"description": "Check if a customer passes the Risk Acceptance Criteria defined by the bank",
|
||||||
|
"operationId": "verifyAccountBalance",
|
||||||
|
"requestBody": {
|
||||||
|
"required": true,
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/VerifyAccountBalanceRequest.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/xml": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/VerifyAccountBalanceRequest.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/x-www-form-urlencoded": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/VerifyAccountBalanceRequest.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Verify Account Balance Successful",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/VerifyAccountBalanceResponse.json"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"application/xml": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "../schemas/VerifyAccountBalanceResponse.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Invalid request"
|
||||||
|
},
|
||||||
|
"422": {
|
||||||
|
"description": "Validation exception"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal server error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"amount": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "200"
|
||||||
|
},
|
||||||
|
"requestId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "RQ621868"
|
||||||
|
},
|
||||||
|
"accountId": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "2017821799"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"accountId",
|
||||||
|
"requestId",
|
||||||
|
"amount"
|
||||||
|
],
|
||||||
|
"xml": {
|
||||||
|
"name": "VerifyAccountBalanceRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"isSufficient": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "true"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"isSufficient"
|
||||||
|
],
|
||||||
|
"xml": {
|
||||||
|
"name": "VerifyAccountBalanceResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user