Added offer and charge
This commit is contained in:
@@ -113,6 +113,12 @@
|
||||
},
|
||||
"/repayment-schedules": {
|
||||
"$ref": "../swagger/paths/RepaymentSchedules.json"
|
||||
},
|
||||
"/offers": {
|
||||
"$ref": "../swagger/paths/Offers.json"
|
||||
},
|
||||
"/charges": {
|
||||
"$ref": "../swagger/paths/Charges.json"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -149,6 +155,12 @@
|
||||
},
|
||||
"RepaymentSchedulesResponse": {
|
||||
"$ref": "../swagger/schemas/RepaymentSchedulesResponse.json"
|
||||
},
|
||||
"OffersResponse": {
|
||||
"$ref": "../swagger/schemas/OffersResponse.json"
|
||||
},
|
||||
"ChargesResponse": {
|
||||
"$ref": "../swagger/schemas/ChargesResponse.json"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"get": {
|
||||
"tags": ["Charges"],
|
||||
"summary": "Get all charges with optional filtering",
|
||||
"description": "Retrieve charges with various filter options including offer ID, charge code, etc.",
|
||||
"operationId": "getCharges",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "offer_id",
|
||||
"in": "query",
|
||||
"description": "Filter by offer ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "SAL30"
|
||||
},
|
||||
{
|
||||
"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": "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/ChargesResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"get": {
|
||||
"tags": ["Offers"],
|
||||
"summary": "Get all offers with optional filtering",
|
||||
"description": "Retrieve offers with various filter options including offer ID, product ID, etc.",
|
||||
"operationId": "getOffers",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "query",
|
||||
"description": "Filter by offer ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "SAL30"
|
||||
},
|
||||
{
|
||||
"name": "product_id",
|
||||
"in": "query",
|
||||
"description": "Filter by product ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "2030"
|
||||
},
|
||||
{
|
||||
"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/OffersResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,16 @@
|
||||
},
|
||||
"example": "101"
|
||||
},
|
||||
{
|
||||
"name": "transaction_id",
|
||||
"in": "query",
|
||||
"description": "Filter by transaction ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "TRX789"
|
||||
},
|
||||
{
|
||||
"name": "paid",
|
||||
"in": "query",
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"charges": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"example": 4
|
||||
},
|
||||
"offer_id": {
|
||||
"type": "string",
|
||||
"example": "SAL30"
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"example": "INTEREST"
|
||||
},
|
||||
"percent": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1.1
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"example": "This is fee 000"
|
||||
},
|
||||
"due": {
|
||||
"type": "integer",
|
||||
"example": 0
|
||||
},
|
||||
"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": "ChargesResponse"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"offers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "SAL30"
|
||||
},
|
||||
"product_id": {
|
||||
"type": "string",
|
||||
"example": "2030"
|
||||
},
|
||||
"min_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 3000.0
|
||||
},
|
||||
"max_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1000000.0
|
||||
},
|
||||
"tenor": {
|
||||
"type": "integer",
|
||||
"example": 30
|
||||
},
|
||||
"schedule": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"interest_rate": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 3.0
|
||||
},
|
||||
"management_rate": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1.0
|
||||
},
|
||||
"insurance_rate": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1.0
|
||||
},
|
||||
"vat_rate": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 7.5
|
||||
},
|
||||
"list_order": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"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": "OffersResponse"
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,10 @@
|
||||
"type": "string",
|
||||
"example": "101"
|
||||
},
|
||||
"transaction_id": {
|
||||
"type": "string",
|
||||
"example": "TRX123456"
|
||||
},
|
||||
"installment_number": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
|
||||
Reference in New Issue
Block a user