From f87baaca063fe427d1aab143a025b466c5a992ce Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 10 Aug 2026 15:04:31 +0200 Subject: [PATCH] Add voucherstatus reason in POST and GET --- .../products/purchased_products-crud.yaml | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/openapi/products/purchased_products-crud.yaml b/src/openapi/products/purchased_products-crud.yaml index c093198..a06ca94 100644 --- a/src/openapi/products/purchased_products-crud.yaml +++ b/src/openapi/products/purchased_products-crud.yaml @@ -219,6 +219,7 @@ paths: "name": "New", }, "createdOn": "2024-10-04T12:34:56.000", + "reason": null, }, { "voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1", @@ -228,6 +229,7 @@ paths: "name": "Issued", }, "createdOn": "2024-10-04T12:37:14.000", + "reason": "test reason" }, ], "voucherClaims": @@ -389,12 +391,14 @@ paths: "voucherStatus": { "voucherStatusId": 1, "name": "New" }, "createdOn": "2024-10-04T12:34:56.000", + "reason": null, }, { "voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1", "voucherStatus": { "voucherStatusId": 2, "name": "Issued" }, "createdOn": "2024-10-04T12:37:14.000", + "reason": "test reason" }, ], "voucherClaims": @@ -1059,6 +1063,7 @@ paths: { "voucherStatusId": 1, "createdOn": "2024-10-04T12:34:56.000", + "reason": "test reason" }, ], "voucherClaims": @@ -1153,12 +1158,14 @@ paths: "voucherStatus": { "voucherStatusId": 1, "name": "New" }, "createdOn": "2024-10-04T12:34:56.000", + "reason": null, }, { "voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1", "voucherStatus": { "voucherStatusId": 2, "name": "Issued" }, "createdOn": "2024-10-04T12:37:14.000", + "reason": "test reason", }, ], "voucherClaims": @@ -1205,9 +1212,16 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "voucherStatusId": 2, "createdOn": "2024-10-04T12:34:56.000" } + $ref: "#/components/schemas/PostIssuedVoucherStatusInstanceRequest" + examples: + 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: "200": description: OK @@ -1241,6 +1255,7 @@ paths: { "voucherStatusId": 3, "name": "Redeemed" }, { "voucherStatusId": 4, "name": "Revoked" }, { "voucherStatusId": 5, "name": "Expired" }, + { "voucherStatusId": 6, "name": "PendingRedemption" }, ], } components: @@ -1252,6 +1267,22 @@ components: schemas: unavailable: 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: type: object required: