payment-history: drop /payments/{id}/gateway in favour of /{id}/gateway
Some checks failed
CI/CD / Deploy binary to server (push) Has been cancelled
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled

Both routes served the same handler and took an order ID, while
/payments/{id} takes a payment ID - so the /payments/ one read as
per-payment and showed up twice in Swagger. /payment-history/{id}/gateway
is the one to use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 23:30:11 +05:00
parent d7e5d1f989
commit 570d4c6d20
5 changed files with 2 additions and 206 deletions

View File

@@ -6682,80 +6682,6 @@ const docTemplate = `{
}
}
},
"/payment-history/payments/{id}/gateway": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby (gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip: iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar nyşany şu endpoint-den işleýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Sargydyň tölegleri GBÜS jogaplary bilen",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-history/{id}": {
"get": {
"security": [

View File

@@ -6679,80 +6679,6 @@
}
}
},
"/payment-history/payments/{id}/gateway": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby (gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan), wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip: iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar nyşany şu endpoint-den işleýär.",
"produces": [
"application/json"
],
"tags": [
"payment-history"
],
"summary": "Sargydyň tölegleri GBÜS jogaplary bilen",
"parameters": [
{
"type": "integer",
"description": "Sargyt ID-si",
"name": "id",
"in": "path",
"required": true
},
{
"enum": [
"tm",
"ru",
"en",
"all"
],
"type": "string",
"default": "tm",
"description": "Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri",
"name": "lang",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/paymenthistory.PaymentGatewayDTO"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/appresult.AppError"
}
}
}
}
},
"/payment-history/{id}": {
"get": {
"security": [

View File

@@ -6880,60 +6880,6 @@ paths:
summary: Bir tölegiň jikme-jikligi
tags:
- payment-history
/payment-history/payments/{id}/gateway:
get:
description: 'Bir sargydyň ähli tölegini her biriniň GBÜS (HALKBANK) soňky jogaby
(gatewayResponse) bilen gaýtarýar: tölendimi, haýsy kartdan tölendi (cardholderName/maskedPan),
wagty (createdAt), töleg ýyly/aýy, mukdarlary we belgisi (orderNumber). Tertip:
iň täzesi birinji. Bellik: GBÜS kart maglumatyny habar berýänçä cardholderName/maskedPan
null, GBÜS asla jogap bermedik bolsa gatewayResponse null; tablisadaky ammar
nyşany şu endpoint-den işleýär.'
parameters:
- description: Sargyt ID-si
in: path
name: id
required: true
type: integer
- default: tm
description: Lokallaşdyrylan meýdanlaryň dili; all - doly {en, ru, tm} obýektleri
enum:
- tm
- ru
- en
- all
in: query
name: lang
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/paymenthistory.PaymentGatewayDTO'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/appresult.AppError'
"403":
description: Forbidden
schema:
$ref: '#/definitions/appresult.AppError'
"404":
description: Not Found
schema:
$ref: '#/definitions/appresult.AppError'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/appresult.AppError'
security:
- BearerAuth: []
summary: Sargydyň tölegleri GBÜS jogaplary bilen
tags:
- payment-history
/payment-settings:
get:
description: Returns the admin-configurable bank and GBÜS commission fees used