update
This commit is contained in:
@@ -79,6 +79,14 @@
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Repayment Schedules",
|
||||
"description": "Get all loan repayment schedules with optional filtering.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
@@ -102,6 +110,9 @@
|
||||
},
|
||||
"/loan-charges": {
|
||||
"$ref": "../swagger/paths/LoanCharges.json"
|
||||
},
|
||||
"/repayment-schedules": {
|
||||
"$ref": "../swagger/paths/RepaymentSchedules.json"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -135,6 +146,9 @@
|
||||
},
|
||||
"LoanChargesResponse": {
|
||||
"$ref": "../swagger/schemas/LoanChargesResponse.json"
|
||||
},
|
||||
"RepaymentSchedulesResponse": {
|
||||
"$ref": "../swagger/schemas/RepaymentSchedulesResponse.json"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
|
||||
@@ -5,6 +5,16 @@
|
||||
"description": "Retrieve loans with various filter options including customer ID, account ID, status, etc.",
|
||||
"operationId": "getLoans",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"description": "Filter by loan ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"example": 1234
|
||||
},
|
||||
{
|
||||
"name": "customer_id",
|
||||
"in": "query",
|
||||
@@ -25,6 +35,26 @@
|
||||
},
|
||||
"example": "ACC456"
|
||||
},
|
||||
{
|
||||
"name": "transaction_id",
|
||||
"in": "query",
|
||||
"description": "Filter by transaction ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "TRX789"
|
||||
},
|
||||
{
|
||||
"name": "original_transaction",
|
||||
"in": "query",
|
||||
"description": "Filter by original transaction",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "ORIG123"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"in": "query",
|
||||
@@ -144,4 +174,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
{
|
||||
"get": {
|
||||
"tags": ["Repayment Schedules"],
|
||||
"summary": "Get all loan repayment schedules with optional filtering",
|
||||
"description": "Retrieve loan repayment schedules with various filter options including loan ID, product ID, paid status, etc.",
|
||||
"operationId": "getRepaymentSchedules",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "loan_id",
|
||||
"in": "query",
|
||||
"description": "Filter by loan ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"example": 1234
|
||||
},
|
||||
{
|
||||
"name": "product_id",
|
||||
"in": "query",
|
||||
"description": "Filter by product ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "101"
|
||||
},
|
||||
{
|
||||
"name": "paid",
|
||||
"in": "query",
|
||||
"description": "Filter by paid status (true/false)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"example": false
|
||||
},
|
||||
{
|
||||
"name": "due_before",
|
||||
"in": "query",
|
||||
"description": "Filter schedules 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 schedules due after this date (ISO format)",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"example": "2023-01-01T00:00:00Z"
|
||||
},
|
||||
{
|
||||
"name": "installment_number",
|
||||
"in": "query",
|
||||
"description": "Filter by installment number",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"example": 1
|
||||
},
|
||||
{
|
||||
"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/RepaymentSchedulesResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,16 @@
|
||||
"type": "string",
|
||||
"example": "ACC456"
|
||||
},
|
||||
"transaction_id": {
|
||||
"type": "string",
|
||||
"example": "TRX789",
|
||||
"nullable": true
|
||||
},
|
||||
"original_transaction": {
|
||||
"type": "string",
|
||||
"example": "ORIG123",
|
||||
"nullable": true
|
||||
},
|
||||
"offer_id": {
|
||||
"type": "string",
|
||||
"example": "OFFER789"
|
||||
@@ -50,10 +60,29 @@
|
||||
"format": "float",
|
||||
"example": 50.0
|
||||
},
|
||||
"upfront_fee": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 100.0,
|
||||
"nullable": true
|
||||
},
|
||||
"repayment_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 10500.0,
|
||||
"nullable": true
|
||||
},
|
||||
"installment_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 3500.0,
|
||||
"nullable": true
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2023-12-31T23:59:59Z"
|
||||
"example": "2023-12-31T23:59:59Z",
|
||||
"nullable": true
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
@@ -105,4 +134,4 @@
|
||||
"xml": {
|
||||
"name": "LoansResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repayment_schedules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"loan_id": {
|
||||
"type": "integer",
|
||||
"example": 1234
|
||||
},
|
||||
"product_id": {
|
||||
"type": "string",
|
||||
"example": "101"
|
||||
},
|
||||
"installment_number": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"due_date": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2023-05-15T00:00:00Z"
|
||||
},
|
||||
"installment_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1000.0
|
||||
},
|
||||
"total_repayment_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1050.0
|
||||
},
|
||||
"paid": {
|
||||
"type": "boolean",
|
||||
"example": false
|
||||
},
|
||||
"paid_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": null,
|
||||
"nullable": true
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2023-01-15T10:30:00Z"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"example": "2023-01-15T10:30:00Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "RepaymentSchedulesResponse"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user