done with disbursement
This commit is contained in:
@@ -147,3 +147,33 @@ def rac_check():
|
||||
}
|
||||
|
||||
return jsonify(response), 200
|
||||
|
||||
|
||||
@loan_bp.route("/disbursement", methods=["POST"])
|
||||
def disbursement():
|
||||
data = request.json
|
||||
api_url = f"{current_app.config['API_BASE_URL']}/Disbursement"
|
||||
|
||||
# response = requests.post(api_url, json=data, headers=get_headers())
|
||||
# return jsonify(response.json()), response.status_code
|
||||
response = {
|
||||
"requestId": "R02802",
|
||||
"countryCode": "NGR",
|
||||
"transactionId": "Tr201712RK9232P115",
|
||||
"debtId": "273194670",
|
||||
"customerId": "CN621868",
|
||||
"accountId": "2017821799",
|
||||
"productId": "101",
|
||||
"provideAmount": 100000,
|
||||
"totalFees": 7075,
|
||||
"feesDetails": {
|
||||
"collectAmountInterest": 5000,
|
||||
"collectAmountMgtFee": 1000,
|
||||
"collectAmountInsurance": 1000,
|
||||
"collectAmountVAT": 75,
|
||||
},
|
||||
"resultCode": "00",
|
||||
"resultDescription": "Loan Request Completed Successfully!",
|
||||
}
|
||||
|
||||
return jsonify(response), 200
|
||||
|
||||
+55
@@ -253,3 +253,58 @@ paths:
|
||||
responses:
|
||||
200:
|
||||
description: A successful response
|
||||
/loans/disbursement:
|
||||
post:
|
||||
summary: Disburse a loan
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
requestId:
|
||||
type: string
|
||||
example: "R02802"
|
||||
countryCode:
|
||||
type: string
|
||||
example: "NGR"
|
||||
transactionId:
|
||||
type: string
|
||||
example: "Tr201712RK9232P115"
|
||||
debtId:
|
||||
type: string
|
||||
example: "273194670"
|
||||
customerId:
|
||||
type: string
|
||||
example: "CN621868"
|
||||
accountId:
|
||||
type: string
|
||||
example: "2017821799"
|
||||
productId:
|
||||
type: string
|
||||
example: "101"
|
||||
provideAmount:
|
||||
type: integer
|
||||
example: 100000
|
||||
totalFees:
|
||||
type: integer
|
||||
example: 7075
|
||||
feesDetails:
|
||||
type: object
|
||||
properties:
|
||||
collectAmountInterest:
|
||||
type: integer
|
||||
example: 5000
|
||||
collectAmountMgtFee:
|
||||
type: integer
|
||||
example: 1000
|
||||
collectAmountInsurance:
|
||||
type: integer
|
||||
example: 1000
|
||||
collectAmountVAT:
|
||||
type: integer
|
||||
example: 75
|
||||
responses:
|
||||
200:
|
||||
description: A successful response
|
||||
|
||||
Reference in New Issue
Block a user