Added Transaction offer
This commit is contained in:
@@ -87,6 +87,14 @@
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Transaction Offers",
|
||||
"description": "Get all transaction offers with optional filtering.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
@@ -116,6 +124,9 @@
|
||||
},
|
||||
"/offers": {
|
||||
"$ref": "../swagger/paths/Offers.json"
|
||||
},
|
||||
"/transaction-offers": {
|
||||
"$ref": "../swagger/paths/TransactionOffers.json"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -155,6 +166,9 @@
|
||||
},
|
||||
"OffersResponse": {
|
||||
"$ref": "../swagger/schemas/OffersResponse.json"
|
||||
},
|
||||
"TransactionOffersResponse": {
|
||||
"$ref": "../swagger/schemas/TransactionOffersResponse.json"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"get": {
|
||||
"tags": ["Transaction Offers"],
|
||||
"summary": "Get all transaction offers with optional filtering",
|
||||
"description": "Retrieve transaction offers with various filter options including customer ID, transaction ID, offer ID, etc.",
|
||||
"operationId": "getTransactionOffers",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "customer_id",
|
||||
"in": "query",
|
||||
"description": "Filter by customer ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "CUST123"
|
||||
},
|
||||
{
|
||||
"name": "transaction_id",
|
||||
"in": "query",
|
||||
"description": "Filter by transaction ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "TRX123456"
|
||||
},
|
||||
{
|
||||
"name": "offer_id",
|
||||
"in": "query",
|
||||
"description": "Filter by offer ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "OFFER456"
|
||||
},
|
||||
{
|
||||
"name": "product_id",
|
||||
"in": "query",
|
||||
"description": "Filter by product ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "PROD789"
|
||||
},
|
||||
{
|
||||
"name": "original_transaction",
|
||||
"in": "query",
|
||||
"description": "Filter by original transaction ID",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "TRX789012"
|
||||
},
|
||||
{
|
||||
"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/TransactionOffersResponse.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transaction_offers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"customer_id": {
|
||||
"type": "string",
|
||||
"example": "CUST123"
|
||||
},
|
||||
"transaction_id": {
|
||||
"type": "string",
|
||||
"example": "TRX123456"
|
||||
},
|
||||
"original_transaction": {
|
||||
"type": "string",
|
||||
"example": "TRX789012"
|
||||
},
|
||||
"offer_id": {
|
||||
"type": "string",
|
||||
"example": "OFFER456"
|
||||
},
|
||||
"product_id": {
|
||||
"type": "string",
|
||||
"example": "PROD789"
|
||||
},
|
||||
"min_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 1000.0
|
||||
},
|
||||
"max_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 5000.0
|
||||
},
|
||||
"eligible_amount": {
|
||||
"type": "number",
|
||||
"format": "float",
|
||||
"example": 3000.0
|
||||
},
|
||||
"tenor": {
|
||||
"type": "integer",
|
||||
"example": 6
|
||||
},
|
||||
"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": "TransactionOffersResponse"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user