Worked on the Loan Information Request and Loan Information Response

This commit is contained in:
Azeez Muibi
2025-03-19 15:49:03 +01:00
parent 9cf9ace55a
commit 9b839e85a8
+103 -57
View File
@@ -119,8 +119,7 @@
}, },
"security": [ "security": [
{ {
"basicAuth": [ "basicAuth": []
]
} }
] ]
} }
@@ -167,8 +166,7 @@
}, },
"security": [ "security": [
{ {
"basicAuth": [ "basicAuth": []
]
} }
] ]
} }
@@ -215,38 +213,26 @@
}, },
"security": [ "security": [
{ {
"basicAuth": [ "basicAuth": []
]
} }
] ]
} }
}, },
"/LoanInformation": { "/LoanInformation": {
"get": { "post": {
"tags": [ "tags": [
"LoanInformation" "LoanInformation"
], ],
"summary": "Loan Information Request ", "summary": "Loan Information Request",
"description": "Loan Information Request", "description": "Loan Information Request",
"operationId": "startEligibilityCheck", "operationId": "getLoanInformation",
"requestBody": { "requestBody": {
"description": "Post JSON to conduct eligibility tests", "description": "Post JSON to get loan information",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/LoanInformationRequest" "$ref": "#/components/schemas/LoanInformationRequest"
} }
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/LoanInformationRequest"
}
},
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/LoanInformationRequest"
}
} }
}, },
"required": true "required": true
@@ -259,16 +245,11 @@
"schema": { "schema": {
"$ref": "#/components/schemas/LoanInformationResponse" "$ref": "#/components/schemas/LoanInformationResponse"
} }
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/LoanInformationResponse"
}
} }
} }
}, },
"400": { "400": {
"description": "Invalid ID supplied" "description": "Invalid request parameters"
}, },
"404": { "404": {
"description": "Loan not found" "description": "Loan not found"
@@ -279,10 +260,7 @@
}, },
"security": [ "security": [
{ {
"petstore_auth": [ "basicAuth": []
"write:pets",
"read:pets"
]
} }
] ]
} }
@@ -788,60 +766,128 @@
} }
} }
}, },
"LoanInformationRequest": { "LoanInformationRequest": {
"type": "object", "type": "object",
"required": [
"$type",
"transactionId",
"customerId",
"channel"
],
"properties": { "properties": {
"$type": {
"type": "string",
"example": "LoanInformationRequest",
"description": "Value is fixed to 'LoanInformationRequest'"
},
"transactionId": { "transactionId": {
"type": "string", "type": "string",
"example": "Tr201712RK9232P115" "example": "Tr201712RK9232P115",
}, "description": "Unique identifier of transaction in FIRSTBANK system"
"resultDescription": {
"type": "string",
"example": "Successful"
}, },
"customerId": { "customerId": {
"type": "string", "type": "string",
"example": "CN621868" "example": "CN621868",
"description": "Unique identifier of a customer"
}, },
"msisdn": { "msisdn": {
"type": "string", "type": "string",
"example": "3451342" "example": "3451342",
"description": "User's mobile number in an international format"
}, },
"channel": { "channel": {
"type": "string", "type": "string",
"example": "USSD" "example": "USSD",
"description": "Request channel: 'USSD' or 'MobileApp' or 'Web'"
} }
},
"xml": {
"name": "LoanInformationRequest"
} }
}, },
"LoanInformationResponse": { "LoanInformationResponse": {
"type": "object", "type": "object",
"required": [
"customerId",
"loans",
"resultCode",
"resultDescription"
],
"properties": { "properties": {
"transactionId": { "customerId": {
"type": "string", "type": "string",
"example": "Tr201712RK9232P115" "example": "CN621868",
"description": "Unique identifier of a user"
}, },
"resultDescription":{ "loans": {
"type": "string", "type": "array",
"example": "Successful" "items": {
"type": "object",
"properties": {
"debtId": {
"type": "string",
"example": "123456789",
"description": "Unique identifier of a debt of a user"
},
"loanDate": {
"type": "string",
"format": "date-time",
"example": "2019-10-18 14:26:21.063",
"description": "Date and time of provided loan"
},
"dueDate": {
"type": "string",
"format": "date-time",
"example": "2019-11-20 14:26:21.063",
"description": "Due date of provided loan"
},
"currentLoanAmount": {
"type": "number",
"format": "double",
"example": 8500.0,
"description": "Outstanding debt amount of the user"
},
"initialLoanAmount": {
"type": "number",
"format": "double",
"example": 10000.0,
"description": "Initial loan amount"
},
"defaultFee": {
"type": "number",
"format": "double",
"example": 0.0,
"description": "Penalty fee amount"
},
"continiousFee": {
"type": "number",
"format": "double",
"example": 0.0,
"description": "Interest fee charged continuously. First occurs when payment is delayed. Continuous fee is equal to Service Fee divided into 30 days. Service fee is equal to 5%, Continuous Interest is 5%/30 = 0,0016% daily."
},
"productId": {
"type": "string",
"example": "101",
"description": "Identifier of a provided product to a user"
}
}
},
"description": "Array of loan entities. If customer doesn't have a loan, 'loans' array will be empty and length of this array will be zero."
},
"totalDebtAmount": {
"type": "number",
"format": "double",
"example": 8500.0,
"description": "Sum amount of all existing debts of a user"
}, },
"resultCode": { "resultCode": {
"type": "string", "type": "string",
"example": "00" "example": "00",
"description": "Result code of executed transaction"
}, },
"customerId": { "resultDescription": {
"type": "string", "type": "string",
"example": "CN621868" "example": "Successful",
}, "description": "Description of provided result code"
"loan": {
"type": "string",
"example": "Arrray of loans"
} }
},
"xml": {
"name": "LoanInformationResponse"
} }
}, },
"ApiResponse": { "ApiResponse": {