Add voucherstatus reason in POST and GET

This commit is contained in:
Max Martens 2026-08-10 15:04:31 +02:00
parent 257f8f939b
commit f87baaca06

View File

@ -219,6 +219,7 @@ paths:
"name": "New", "name": "New",
}, },
"createdOn": "2024-10-04T12:34:56.000", "createdOn": "2024-10-04T12:34:56.000",
"reason": null,
}, },
{ {
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1", "voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
@ -228,6 +229,7 @@ paths:
"name": "Issued", "name": "Issued",
}, },
"createdOn": "2024-10-04T12:37:14.000", "createdOn": "2024-10-04T12:37:14.000",
"reason": "test reason"
}, },
], ],
"voucherClaims": "voucherClaims":
@ -389,12 +391,14 @@ paths:
"voucherStatus": "voucherStatus":
{ "voucherStatusId": 1, "name": "New" }, { "voucherStatusId": 1, "name": "New" },
"createdOn": "2024-10-04T12:34:56.000", "createdOn": "2024-10-04T12:34:56.000",
"reason": null,
}, },
{ {
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1", "voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
"voucherStatus": "voucherStatus":
{ "voucherStatusId": 2, "name": "Issued" }, { "voucherStatusId": 2, "name": "Issued" },
"createdOn": "2024-10-04T12:37:14.000", "createdOn": "2024-10-04T12:37:14.000",
"reason": "test reason"
}, },
], ],
"voucherClaims": "voucherClaims":
@ -1059,6 +1063,7 @@ paths:
{ {
"voucherStatusId": 1, "voucherStatusId": 1,
"createdOn": "2024-10-04T12:34:56.000", "createdOn": "2024-10-04T12:34:56.000",
"reason": "test reason"
}, },
], ],
"voucherClaims": "voucherClaims":
@ -1153,12 +1158,14 @@ paths:
"voucherStatus": "voucherStatus":
{ "voucherStatusId": 1, "name": "New" }, { "voucherStatusId": 1, "name": "New" },
"createdOn": "2024-10-04T12:34:56.000", "createdOn": "2024-10-04T12:34:56.000",
"reason": null,
}, },
{ {
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1", "voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
"voucherStatus": "voucherStatus":
{ "voucherStatusId": 2, "name": "Issued" }, { "voucherStatusId": 2, "name": "Issued" },
"createdOn": "2024-10-04T12:37:14.000", "createdOn": "2024-10-04T12:37:14.000",
"reason": "test reason",
}, },
], ],
"voucherClaims": "voucherClaims":
@ -1205,9 +1212,16 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/PostIssuedVoucherStatusInstanceRequest"
example: examples:
{ "voucherStatusId": 2, "createdOn": "2024-10-04T12:34:56.000" } newToIssued:
summary: Mark a voucher as issued
value:
{ "voucherStatusId": 2, "createdOn": "2024-10-04T12:34:56.000" }
issuedToRevokedWithReason:
summary: Mark a voucher as revoked with reason
value:
{ "voucherStatusId": 4, "createdOn": "2024-10-04T12:34:56.000", "reason": "Voucher revoked because it was redeemed by an unauthorized user." }
responses: responses:
"200": "200":
description: OK description: OK
@ -1241,6 +1255,7 @@ paths:
{ "voucherStatusId": 3, "name": "Redeemed" }, { "voucherStatusId": 3, "name": "Redeemed" },
{ "voucherStatusId": 4, "name": "Revoked" }, { "voucherStatusId": 4, "name": "Revoked" },
{ "voucherStatusId": 5, "name": "Expired" }, { "voucherStatusId": 5, "name": "Expired" },
{ "voucherStatusId": 6, "name": "PendingRedemption" },
], ],
} }
components: components:
@ -1252,6 +1267,22 @@ components:
schemas: schemas:
unavailable: unavailable:
type: object type: object
PostIssuedVoucherStatusInstanceRequest:
type: object
required:
- voucherStatusId
- createdOn
properties:
voucherStatusId:
type: integer
example: 4
createdOn:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
reason:
type: string
example: "Voucher revoked because it was redeemed by an unauthorized user."
PostPurchasedTapConnectTicketRequest: PostPurchasedTapConnectTicketRequest:
type: object type: object
required: required: