forked from DigiFi/digifi-BankToProductCore
[add]: eco models
This commit is contained in:
@@ -70,6 +70,7 @@ You can check if the Flask application is running by accessing the `/health` end
|
||||
|
||||
```bash
|
||||
curl http://localhost:4500/health
|
||||
curl http://localhost:4500/eco/health
|
||||
```
|
||||
|
||||
If the application is running properly, you should receive a response similar to this:
|
||||
@@ -87,6 +88,7 @@ You can check the Swagger Doc by accessing the `/documentation` endpoint. Run th
|
||||
|
||||
```bash
|
||||
curl http://localhost:4500/documentation
|
||||
curl http://localhost:4500/eco/documentation
|
||||
```
|
||||
|
||||
|
||||
|
||||
+9
-1
@@ -1,3 +1,4 @@
|
||||
from re import U
|
||||
from flask import Flask
|
||||
from flask_mail import Mail
|
||||
import os
|
||||
@@ -40,11 +41,18 @@ def create_app():
|
||||
|
||||
# Register blueprints
|
||||
app.register_blueprint(api)
|
||||
app.register_blueprint(eco)
|
||||
app.register_blueprint(eco, url_prefix="/eco")
|
||||
|
||||
swagger_ui_blueprint = get_swaggerui_blueprint(SWAGGER_URL, API_URL)
|
||||
app.register_blueprint(swagger_ui_blueprint, url_prefix=SWAGGER_URL)
|
||||
|
||||
# Second UI (ECO)
|
||||
eco_docs = "/eco" + SWAGGER_URL
|
||||
eco_api = "/eco" + API_URL
|
||||
swagger_ui_eco = get_swaggerui_blueprint(eco_docs, eco_api)
|
||||
swagger_ui_eco.name = 'swagger_ui_eco' # Rename blueprint
|
||||
app.register_blueprint(swagger_ui_eco, url_prefix=eco_docs)
|
||||
|
||||
# Error Handlers
|
||||
register_error_handlers(app)
|
||||
|
||||
|
||||
@@ -11,6 +11,13 @@ from .loan_repayment_schedule import LoanRepaymentSchedule
|
||||
from .transaction_offers import TransactionOffer
|
||||
from .repayments_data import RepaymentsData
|
||||
from .salary import Salary
|
||||
from .eco.account import EcoAccount
|
||||
from .eco.customer import EcoCustomer
|
||||
from .eco.loan import EcoLoan
|
||||
from .eco.session import EcoSession
|
||||
from .eco.installment import EcoInstallment
|
||||
from .eco.offer import EcoOffer
|
||||
|
||||
|
||||
|
||||
__all__ = ['Customer', 'Account', 'Loan', 'Transaction', 'Repayment', 'LoanCharge', 'Offer', 'Charge', 'RACCheck', 'LoanRepaymentSchedule', 'TransactionOffer', 'RepaymentsData', 'Salary']
|
||||
@@ -0,0 +1,180 @@
|
||||
{
|
||||
"openapi": "3.0.3",
|
||||
"info": {
|
||||
"title": "Swagger Bank Channel to Simbrella FirstAdvance - OpenAPI 3.0",
|
||||
"description": "This is a Simbrella FirstAdvance Backend Server with the OpenAPI 3.0 specification. \n\n\nSome useful links:\n- [Web Simulated Demo Page](https://digifi-salaryloan.chiefsoft.net/)\n- [Web Management Support Portal](https://digifi-office.chiefsoft.net/auth/login)",
|
||||
"termsOfService": "http://swagger.io/terms/",
|
||||
"contact": {
|
||||
"email": "support@chiefsoft.com"
|
||||
},
|
||||
"license": {
|
||||
"name": "Apache 2.0",
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "1.0.11"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:4500"
|
||||
},
|
||||
{
|
||||
"url": "http://api.dev.simbrellang.net:4500"
|
||||
},
|
||||
{
|
||||
"url": "https://api.dev.simbrellang.net"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"name": "Authorize",
|
||||
"description": "This feature will be used for authorizing customers.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "AuthorizeRefresh",
|
||||
"description": "This feature will be used for refreshing authorized customers.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "EligibilityCheck",
|
||||
"description": "Eligibility Check Request",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "SelectOffer",
|
||||
"description": "This method is used the send the offer the customer selected to Simbrella.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ProvideLoan",
|
||||
"description": "Provide Loan Request.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "LoanStatus",
|
||||
"description": "Loan Information Request.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Repayment",
|
||||
"description": "Repayment Request.",
|
||||
"externalDocs": {
|
||||
"description": "Find out more",
|
||||
"url": "https://www.simbrellang.net"
|
||||
}
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/Authorize": {
|
||||
"$ref": "swagger/paths/Authorize.json"
|
||||
},
|
||||
"/AuthorizeRefresh": {
|
||||
"$ref": "swagger/paths/AuthorizeRefresh.json"
|
||||
},
|
||||
"/EligibilityCheck": {
|
||||
"$ref": "swagger/paths/EligibilityCheck.json"
|
||||
},
|
||||
"/SelectOffer": {
|
||||
"$ref": "swagger/paths/SelectOffer.json"
|
||||
},
|
||||
"/ProvideLoan": {
|
||||
"$ref": "swagger/paths/ProvideLoan.json"
|
||||
},
|
||||
"/LoanStatus": {
|
||||
"$ref": "swagger/paths/LoanStatus.json"
|
||||
},
|
||||
"/Repayment": {
|
||||
"$ref": "swagger/paths/Repayment.json"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"EligibilityCheckRequest": {
|
||||
"$ref": "swagger/schemas/EligibilityCheckRequest.json"
|
||||
},
|
||||
"EligibilityCheckResponse": {
|
||||
"$ref": "swagger/schemas/EligibilityCheckResponse.json"
|
||||
},
|
||||
"SelectOfferRequest": {
|
||||
"$ref": "swagger/schemas/SelectOfferRequest.json"
|
||||
},
|
||||
"SelectOfferResponse": {
|
||||
"$ref": "swagger/schemas/SelectOfferResponse.json"
|
||||
},
|
||||
"LoanStatusRequest": {
|
||||
"$ref": "swagger/schemas/LoanStatusRequest.json"
|
||||
},
|
||||
"LoanStatusResponse": {
|
||||
"$ref": "swagger/schemas/LoanStatusResponse.json"
|
||||
},
|
||||
"RepaymentRequest": {
|
||||
"$ref": "swagger/schemas/RepaymentRequest.json"
|
||||
},
|
||||
"RepaymentResponse": {
|
||||
"$ref": "swagger/schemas/RepaymentResponse.json"
|
||||
},
|
||||
"CustomerConsentRequest": {
|
||||
"$ref": "swagger/schemas/CustomerConsentRequest.json"
|
||||
},
|
||||
"CustomerConsentResponse": {
|
||||
"$ref": "swagger/schemas/CustomerConsentResponse.json"
|
||||
},
|
||||
"NotificationCallbackRequest": {
|
||||
"$ref": "swagger/schemas/NotificationCallbackRequest.json"
|
||||
},
|
||||
"NotificationCallbackResponse": {
|
||||
"$ref": "swagger/schemas/NotificationCallbackResponse.json"
|
||||
},
|
||||
"ApiResponse": {
|
||||
"$ref": "swagger/schemas/ApiResponse.json"
|
||||
},
|
||||
"AuthorizeResponse": {
|
||||
"$ref": "swagger/schemas/AuthorizeResponse.json"
|
||||
},
|
||||
"AuthorizeRequest": {
|
||||
"$ref": "swagger/schemas/AuthorizeRequest.json"
|
||||
},
|
||||
"AuthorizeRefreshResponse": {
|
||||
"$ref": "swagger/schemas/AuthorizeRefreshResponse.json"
|
||||
},
|
||||
"AuthorizeRefreshRequest": {
|
||||
"$ref": "swagger/schemas/AuthorizeRefreshRequest.json"
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
"basicAuth": {
|
||||
"type": "http",
|
||||
"scheme": "basic"
|
||||
},
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
"bearerFormat": "JWT"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"basicAuth": [],
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user