add payment settting
Some checks failed
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

This commit is contained in:
2026-09-19 02:12:59 +05:00
parent 0971158e98
commit b8455625b5
21 changed files with 1760 additions and 12 deletions

View File

@@ -387,7 +387,7 @@
"BearerAuth": []
}
],
"description": "Creates a branch-user assignment, or updates the user's existing branch if one is already assigned",
"description": "Assigns a user to a branch. Users and branches are many-to-many: a user keeps their other branch assignments, and re-assigning the same pair is a no-op.",
"consumes": [
"application/json"
],
@@ -4891,6 +4891,86 @@
}
}
},
"/payment-settings": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the admin-configurable bank and GBÜS commission fees used on loan payments",
"produces": [
"application/json"
],
"tags": [
"payment-settings"
],
"summary": "Get payment settings",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymentsettings.PaymentSettingsDTO"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates the bank and GBÜS commission fees used on loan payments",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"payment-settings"
],
"summary": "Update payment settings",
"parameters": [
{
"description": "Payment settings payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/paymentsettings.UpdatePaymentSettingsDTO"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/paymentsettings.PaymentSettingsDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/permission-roles": {
"post": {
"security": [
@@ -6491,7 +6571,7 @@
"BearerAuth": []
}
],
"description": "Returns paginated users with role user, including roleId",
"description": "Returns paginated users, including roleId. Admin-guard callers (admin, superadmin, and other admin-guard roles) see users of every role; branch-scoped operators see role=user only, scoped to their branches.",
"produces": [
"application/json"
],
@@ -7187,6 +7267,122 @@
}
}
}
},
"/visa-master-payment-orders/{id}/pay": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Charges the payment gateway and marks the order paid on success",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"visa-master-payment-orders"
],
"summary": "Pay out a visa/master/sber order",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Payment payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/visamasterpay.PayOrderDTO"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.PaymentResultDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/visa-master-payment-orders/{id}/quote": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns the current rate, configured fees, and max payable amount for an order's payout",
"produces": [
"application/json"
],
"tags": [
"visa-master-payment-orders"
],
"summary": "Quote a visa/master/sber payment",
"parameters": [
{
"type": "integer",
"description": "Visa/master payment order ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/visamasterpay.PaymentQuoteDTO"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
}
},
"definitions": {
@@ -9058,6 +9254,49 @@
}
}
},
"paymentsettings.PaymentSettingsDTO": {
"type": "object",
"properties": {
"bankFeeTmt": {
"type": "number"
},
"gbusFeeTmt": {
"type": "number"
},
"sberBankFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"updatedAt": {
"type": "string"
}
}
},
"paymentsettings.UpdatePaymentSettingsDTO": {
"type": "object",
"required": [
"bankFeeTmt",
"gbusFeeTmt",
"sberBankFeeTmt",
"tvebFeeUsd"
],
"properties": {
"bankFeeTmt": {
"type": "number"
},
"gbusFeeTmt": {
"type": "number"
},
"sberBankFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
}
}
},
"permission.CreatePermissionDTO": {
"type": "object",
"required": [
@@ -9395,6 +9634,7 @@
"type": "object",
"required": [
"address",
"amountUsd",
"branchId",
"passportName",
"passportSurname",
@@ -9409,6 +9649,9 @@
"address": {
"type": "string"
},
"amountUsd": {
"type": "number"
},
"branchId": {
"type": "integer"
},
@@ -9487,6 +9730,7 @@
"type": "object",
"required": [
"address",
"amountUsd",
"branchId",
"passportName",
"passportSurname",
@@ -9501,6 +9745,9 @@
"address": {
"type": "string"
},
"amountUsd": {
"type": "number"
},
"branchId": {
"type": "integer"
},
@@ -9574,6 +9821,100 @@
"type": "integer"
}
}
},
"visamasterpay.PayOrderDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"paymentPeriod": {
"type": "string",
"format": "date"
}
}
},
"visamasterpay.PaymentQuoteDTO": {
"type": "object",
"properties": {
"bankFeeTmt": {
"type": "number"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"gbusFeeTmt": {
"type": "number"
},
"maxAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
}
}
},
"visamasterpay.PaymentResultDTO": {
"type": "object",
"properties": {
"amountTmt": {
"type": "number"
},
"amountUsd": {
"type": "number"
},
"bankFeeTmt": {
"type": "number"
},
"exchangeRateRub": {
"type": "number"
},
"exchangeRateUsd": {
"type": "number"
},
"gatewayReference": {
"type": "string"
},
"gatewayStatus": {
"type": "string"
},
"gbusFeeTmt": {
"type": "number"
},
"orderId": {
"type": "integer"
},
"paid": {
"type": "boolean"
},
"paidAt": {
"type": "string"
},
"paymentPeriod": {
"type": "string"
},
"totalAmountTmt": {
"type": "number"
},
"tvebFeeTmt": {
"type": "number"
},
"tvebFeeUsd": {
"type": "number"
},
"type": {
"type": "string"
}
}
}
},
"securityDefinitions": {