update
This commit is contained in:
@@ -65,8 +65,16 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Repayment",
|
||||
"description": "Repayment Request.",
|
||||
"name": "Repayments",
|
||||
"description": "Get all repayments with optional filtering.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Loan Charges",
|
||||
"description": "Get all loan charges with optional filtering.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
@@ -89,8 +97,11 @@
|
||||
"/transactions": {
|
||||
"$ref": "../swagger/paths/Transactions.json"
|
||||
},
|
||||
"/Repayment": {
|
||||
"$ref": "../swagger/paths/Repayment.json"
|
||||
"/repayments": {
|
||||
"$ref": "../swagger/paths/Repayments.json"
|
||||
},
|
||||
"/loan-charges": {
|
||||
"$ref": "../swagger/paths/LoanCharges.json"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -119,11 +130,11 @@
|
||||
"TransactionsResponse": {
|
||||
"$ref": "../swagger/schemas/TransactionsResponse.json"
|
||||
},
|
||||
"RepaymentRequest": {
|
||||
"$ref": "../swagger/schemas/RepaymentRequest.json"
|
||||
"RepaymentsResponse": {
|
||||
"$ref": "../swagger/schemas/RepaymentsResponse.json"
|
||||
},
|
||||
"RepaymentResponse": {
|
||||
"$ref": "../swagger/schemas/RepaymentResponse.json"
|
||||
"LoanChargesResponse": {
|
||||
"$ref": "../swagger/schemas/LoanChargesResponse.json"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
{
|
||||
"get": {
|
||||
"tags": ["Loan Charges"],
|
||||
"summary": "Get all loan charges with optional filtering",
|
||||
"description": "Retrieve loan charges with various filter options including loan ID, charge code, etc.",
|
||||
"operationId": "getLoanCharges",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "loan_id",
|
||||
"in": "query",
|
||||
"description": "Filter by loan ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"example": 7463
|
||||
},
|
||||
{
|
||||
"name": "code",
|
||||
"in": "query",
|
||||
"description": "Filter by charge code",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "INTEREST"
|
||||
},
|
||||
{
|
||||
"name": "start_date",
|
||||
"in": "query",
|
||||
"description": "Filter by start date (ISO format)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"example": "2023-01-01T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"name": "end_date",
|
||||
"in": "query",
|
||||
"description": "Filter by end date (ISO format)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"example": "2023-12-31T23:59:59Z"
|
||||
},
|
||||
{
|
||||
"name": "due_before",
|
||||
"in": "query",
|
||||
"description": "Filter charges due before this date (ISO format)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"example": "2023-12-31T23:59:59Z"
|
||||
},
|
||||
{
|
||||
"name": "due_after",
|
||||
"in": "query",
|
||||
"description": "Filter charges due after this date (ISO format)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"example": "2023-01-01T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"description": "Page number for pagination",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1,
|
||||
"minimum": 1
|
||||
},
|
||||
"example": 1
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Number of items per page (max 100)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
},
|
||||
"example": 20
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful operation",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../schemas/LoanChargesResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"get": {
|
||||
"tags": ["Repayments"],
|
||||
"summary": "Get all repayments with optional filtering",
|
||||
"description": "Retrieve repayments with various filter options including loan ID, customer ID, product ID, etc.",
|
||||
"operationId": "getRepayments",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "loan_id",
|
||||
"in": "query",
|
||||
"description": "Filter by loan ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "10"
|
||||
},
|
||||
{
|
||||
"name": "customer_id",
|
||||
"in": "query",
|
||||
"description": "Filter by customer ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "CID0000025585"
|
||||
},
|
||||
{
|
||||
"name": "product_id",
|
||||
"in": "query",
|
||||
"description": "Filter by product ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "101"
|
||||
},
|
||||
{
|
||||
"name": "start_date",
|
||||
"in": "query",
|
||||
"description": "Filter by start date (ISO format)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"example": "2023-01-01T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"name": "end_date",
|
||||
"in": "query",
|
||||
"description": "Filter by end date (ISO format)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"example": "2023-12-31T23:59:59Z"
|
||||
},
|
||||
{
|
||||
"name": "page",
|
||||
"in": "query",
|
||||
"description": "Page number for pagination",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 1,
|
||||
"minimum": 1
|
||||
},
|
||||
"example": 1
|
||||
},
|
||||
{
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
"description": "Number of items per page (max 100)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"default": 20,
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
},
|
||||
"example": 20
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful operation",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "../schemas/RepaymentsResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"loan_charges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"loan_id": {
|
||||
"type": "integer",
|
||||
"example": 7463
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"example": "INTEREST"
|
||||
},
|
||||
"amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 0.00
|
||||
},
|
||||
"percent": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1.1
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"example": "This is fee 9000"
|
||||
},
|
||||
"due": {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"transaction_ {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"transaction_id": {
|
||||
"type": "string",
|
||||
"example": "TRX123456",
|
||||
"nullable": true
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2025-04-16T20:03:31.998445Z",
|
||||
"nullable": true
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2025-04-16T20:03:31.998085Z"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2025-04-16T20:03:31.998445Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"pagination": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total_count": {
|
||||
"type": "integer",
|
||||
"example": 100
|
||||
},
|
||||
"total_pages": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"current_page": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"example": 20
|
||||
},
|
||||
"has_next": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"has_prev": {
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"xml": {
|
||||
"name": "LoanChargesResponse"
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"msisdn": {
|
||||
"type": "string",
|
||||
"example": "3451342"
|
||||
},
|
||||
"debtId": {
|
||||
"type": "string",
|
||||
"example": "10"
|
||||
},
|
||||
"productId": {
|
||||
"type": "string",
|
||||
"example": "101"
|
||||
},
|
||||
"transactionId": {
|
||||
"type": "string",
|
||||
"example": "20171209232115"
|
||||
},
|
||||
"customerId": {
|
||||
"type": "string",
|
||||
"example": "CID0000025585"
|
||||
},
|
||||
"channel": {
|
||||
"type": "string",
|
||||
"example": "USSD"
|
||||
},
|
||||
"accountId": {
|
||||
"type": "string",
|
||||
"example": "ACN8263457"
|
||||
}
|
||||
},
|
||||
"xml": {
|
||||
"name": "RepaymentRequest"
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"customerId": {
|
||||
"type": "string",
|
||||
"example": "CN621868"
|
||||
},
|
||||
"productId": {
|
||||
"type": "string",
|
||||
"example": "101"
|
||||
},
|
||||
"debtId": {
|
||||
"type": "string",
|
||||
"example": "273194670"
|
||||
},
|
||||
"resultCode": {
|
||||
"type": "string",
|
||||
"example": "00"
|
||||
},
|
||||
"resultDescription": {
|
||||
"type": "string",
|
||||
"example": "Successful"
|
||||
}
|
||||
},
|
||||
"xml": {
|
||||
"name": "RepaymentResponse"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repayments": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"loan_id": {
|
||||
"type": "string",
|
||||
"example": "10"
|
||||
},
|
||||
"customer_id": {
|
||||
"type": "string",
|
||||
"example": "CID0000025585"
|
||||
},
|
||||
"product_id": {
|
||||
"type": "string",
|
||||
"example": "101"
|
||||
},
|
||||
"transaction_id": {
|
||||
"type": "string",
|
||||
"example": "TRX123456",
|
||||
"nullable": true
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2025-04-10T16:45:47.879552Z"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2025-04-10T16:45:47.879642Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"pagination": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total_count": {
|
||||
"type": "integer",
|
||||
"example": 100
|
||||
},
|
||||
"total_pages": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"current_page": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"example": 20
|
||||
},
|
||||
"has_next": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"has_prev": {
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"xml": {
|
||||
"name": "RepaymentsResponse"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user