From 36fb04cbdca3a39d372508241ccafc04b8bceaa1 Mon Sep 17 00:00:00 2001 From: Azeez Muibi Date: Wed, 19 Mar 2025 14:36:37 +0100 Subject: [PATCH] Worked on the Eligibility Check Request and Eligibility Check Response --- digifi_swagger.json | 147 +++++++++++++++++++++++++++----------------- 1 file changed, 91 insertions(+), 56 deletions(-) diff --git a/digifi_swagger.json b/digifi_swagger.json index ec609eb..f30ca4c 100644 --- a/digifi_swagger.json +++ b/digifi_swagger.json @@ -79,7 +79,6 @@ "paths": { "/EligibilityCheck": { "post": { - "tags": [ "EligibilityCheck" ], @@ -93,16 +92,6 @@ "schema": { "$ref": "#/components/schemas/EligibilityCheckRequest" } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/EligibilityCheckRequest" - } - }, - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/EligibilityCheckRequest" - } } }, "required": true @@ -115,19 +104,14 @@ "schema": { "$ref": "#/components/schemas/EligibilityCheckResponse" } - }, - "application/xml": { - "schema": { - "$ref": "#/components/schemas/EligibilityCheckResponse" - } } } }, "400": { - "description": "Invalid ID supplied" + "description": "Invalid request parameters" }, "404": { - "description": "Pet not found" + "description": "Resource not found" }, "422": { "description": "Validation exception" @@ -135,9 +119,7 @@ }, "security": [ { - "petstore_auth": [ - "write:pets", - "read:pets" + "basicAuth": [ ] } ] @@ -412,71 +394,124 @@ "schemas": { "EligibilityCheckRequest": { "type": "object", + "required": [ + "$type", + "transactionId", + "countryCode", + "customerId", + "accountId", + "lienAmount", + "channel" + ], "properties": { - "lienAmount": { - "type": "number", - "format": "double", - "example": 500.01 + "$type": { + "type": "string", + "example": "EligibilityCheckRequest", + "description": "Value is fixed to 'EligibilityCheckRequest'" }, "transactionId": { "type": "string", - "example": "Tr201712RK9232P115" + "example": "Tr201712RK9232P115", + "description": "Unique identifier of transaction in FIRSTBANK system" }, "countryCode": { "type": "string", - "example": "NGR" + "example": "NGR", + "description": "Unique country code. Please refer to 'Country Codes' table" }, "customerId": { "type": "string", - "example": "CN621868" - }, - "msisdn": { - "type": "string", - "example": "3451342" - }, - "channel": { - "type": "string", - "example": "USSD" + "example": "CN621868", + "description": "Unique identifier of a customer" }, "accountId": { "type": "string", - "example": "ACN8263457" + "example": "ACN8263457", + "description": "Specific identifier of a user's account" + }, + "msisdn": { + "type": "string", + "example": "3451342", + "description": "User's mobile number in an international format" + }, + "lienAmount": { + "type": "number", + "format": "double", + "example": 4.0, + "description": "Amount of lien placed on user's account" + }, + "channel": { + "type": "string", + "example": "USSD", + "description": "Request channel: 'USSD' or 'MobApp' or 'Web'" } - }, - "xml": { - "name": "EligibilityCheckRequest" } }, "EligibilityCheckResponse": { "type": "object", + "required": [ + "customerId", + "transactionId", + "eligibleOffers", + "resultCode", + "resultDescription" + ], "properties": { - "eligibleOffers": { - "type": "string", - "example": "OFFERS ARRAY HERE" - }, - "resultDescription": { - "type": "string", - "example": "Successful" - }, "customerId": { "type": "string", - "example": "CN621868" + "example": "CN621868", + "description": "Unique identifier of a customer" + }, + "transactionId": { + "type": "string", + "example": "Tr201712RK9232P115", + "description": "Unique identifier of transaction in FIRSTBANK system" }, "msisdn": { "type": "string", - "example": "3451342" + "example": "3451342", + "description": "User's mobile number in an international format" + }, + "eligibleOffers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "minamount": { + "type": "number", + "format": "double", + "example": 5000 + }, + "maxamount": { + "type": "number", + "format": "double", + "example": 20000 + }, + "productId": { + "type": "integer", + "example": 101 + }, + "offerid": { + "type": "integer", + "example": 101 + }, + "Tenor": { + "type": "integer", + "example": 30 + } + } + } }, "resultCode": { "type": "string", - "example": "00" + "example": "00", + "description": "Result code of executed transaction, e.g. (00 – Success etc.)" }, - "accountId": { + "resultDescription": { "type": "string", - "example": "ACN8263457" + "example": "Successful", + "description": "Textual description of provided result code" } - }, - "xml": { - "name": "EligibilityCheckResponse" } }, "SelectOffersRequest": {