OVPAY-2294 - Introduced voucherStatusInstance.
This commit is contained in:
parent
8f93fb03fd
commit
959ed1cd96
@ -204,8 +204,27 @@ paths:
|
|||||||
{
|
{
|
||||||
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
|
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
|
||||||
"voucherCode": "VOUCHER12345",
|
"voucherCode": "VOUCHER12345",
|
||||||
|
"voucherStatusInstances":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"voucherStatusInstanceId": "ac8c54d1-79f7-4167-8817-c66b9575d679",
|
||||||
"voucherStatus":
|
"voucherStatus":
|
||||||
{ "voucherStatusId": 1, "name": "Active" },
|
{
|
||||||
|
"voucherStatusId": 1,
|
||||||
|
"name": "New",
|
||||||
|
},
|
||||||
|
"createdOn": "2024-10-04T12:34:56.000",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
|
||||||
|
"voucherStatus":
|
||||||
|
{
|
||||||
|
"voucherStatusId": 2,
|
||||||
|
"name": "Issued",
|
||||||
|
},
|
||||||
|
"createdOn": "2024-10-04T12:37:14.000",
|
||||||
|
},
|
||||||
|
],
|
||||||
"voucherClaims":
|
"voucherClaims":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -331,7 +350,13 @@ paths:
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"voucherCode": "VOUCHER123",
|
"voucherCode": "VOUCHER123",
|
||||||
|
"voucherStatusInstances":
|
||||||
|
[
|
||||||
|
{
|
||||||
"voucherStatusId": 1,
|
"voucherStatusId": 1,
|
||||||
|
"createdOn": "2024-10-04T12:34:56.000",
|
||||||
|
},
|
||||||
|
],
|
||||||
"voucherClaims":
|
"voucherClaims":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -484,12 +509,33 @@ paths:
|
|||||||
{
|
{
|
||||||
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
|
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
|
||||||
"voucherCode": "VOUCHER12345",
|
"voucherCode": "VOUCHER12345",
|
||||||
"redeemedOn": null,
|
"voucherStatusInstances":
|
||||||
"expiresOn": "2024-12-31T23:59:59.000",
|
[
|
||||||
|
{
|
||||||
|
"voucherStatusInstanceId": "ac8c54d1-79f7-4167-8817-c66b9575d679",
|
||||||
|
"voucherStatus":
|
||||||
|
{ "voucherStatusId": 1, "name": "New" },
|
||||||
"createdOn": "2024-10-04T12:34:56.000",
|
"createdOn": "2024-10-04T12:34:56.000",
|
||||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
},
|
||||||
"createdBy": "admin",
|
{
|
||||||
"lastUpdatedBy": "admin",
|
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
|
||||||
|
"voucherStatus":
|
||||||
|
{ "voucherStatusId": 2, "name": "Issued" },
|
||||||
|
"createdOn": "2024-10-04T12:37:14.000",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"voucherClaims":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"voucherClaimId": "b1c2d3e4-f5g6-h7i8-j9k0-l1m2n3o4p5q6",
|
||||||
|
"mandatoryCustomerDataItem":
|
||||||
|
{
|
||||||
|
"mandatoryCustomerDataItemId": 8,
|
||||||
|
"name": "PadBirthdate",
|
||||||
|
},
|
||||||
|
"value": "1990-01-01",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@ -1085,7 +1131,13 @@ paths:
|
|||||||
example:
|
example:
|
||||||
{
|
{
|
||||||
"voucherCode": "VOUCHER123",
|
"voucherCode": "VOUCHER123",
|
||||||
|
"voucherStatusInstances":
|
||||||
|
[
|
||||||
|
{
|
||||||
"voucherStatusId": 1,
|
"voucherStatusId": 1,
|
||||||
|
"createdOn": "2024-10-04T12:34:56.000",
|
||||||
|
},
|
||||||
|
],
|
||||||
"voucherClaims":
|
"voucherClaims":
|
||||||
[
|
[
|
||||||
{ "mandatoryCustomerDataItemId": 8, "value": "1999-12-31" },
|
{ "mandatoryCustomerDataItemId": 8, "value": "1999-12-31" },
|
||||||
@ -1139,7 +1191,7 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
explode: false
|
explode: false
|
||||||
required: false
|
required: false
|
||||||
description: The status id of the voucher.
|
description: The moest recent status id of the voucher.
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -1155,8 +1207,21 @@ paths:
|
|||||||
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||||
"purchasedProductId": "058a1af7-897f-45d5-b691-9cc9161e387f",
|
"purchasedProductId": "058a1af7-897f-45d5-b691-9cc9161e387f",
|
||||||
"voucherCode": "VOUCHER123",
|
"voucherCode": "VOUCHER123",
|
||||||
|
"voucherStatusInstances":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"voucherStatusInstanceId": "ac8c54d1-79f7-4167-8817-c66b9575d679",
|
||||||
"voucherStatus":
|
"voucherStatus":
|
||||||
{ "voucherStatusId": 1, "name": "New" },
|
{ "voucherStatusId": 1, "name": "New" },
|
||||||
|
"createdOn": "2024-10-04T12:34:56.000",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"voucherStatusInstanceId": "b01412e6-70fb-4c05-9bef-e65bf2747ca1",
|
||||||
|
"voucherStatus":
|
||||||
|
{ "voucherStatusId": 2, "name": "Issued" },
|
||||||
|
"createdOn": "2024-10-04T12:37:14.000",
|
||||||
|
},
|
||||||
|
],
|
||||||
"voucherClaims":
|
"voucherClaims":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -1179,7 +1244,7 @@ paths:
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
/issuedvouchers/{issuedVoucherId}:
|
/issuedvouchers/{issuedVoucherId}/voucherstatusinstances:
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: issuedVoucherId
|
name: issuedVoucherId
|
||||||
@ -1189,18 +1254,19 @@ paths:
|
|||||||
example: d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90
|
example: d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90
|
||||||
required: true
|
required: true
|
||||||
description: The id of the issued voucher to process.
|
description: The id of the issued voucher to process.
|
||||||
patch:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Issued Voucher
|
- Issued Voucher
|
||||||
summary: Update an issued voucher.
|
summary: Update the status of an issued voucher.
|
||||||
description: Update an issued voucher.
|
description: Update the status of an issued voucher.
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/unavailable"
|
$ref: "#/components/schemas/unavailable"
|
||||||
example: { "voucherStatusId": 2 }
|
example:
|
||||||
|
{ "voucherStatusId": 2, "createdOn": "2024-10-04T12:34:56.000" }
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -1209,7 +1275,33 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/unavailable"
|
$ref: "#/components/schemas/unavailable"
|
||||||
example:
|
example:
|
||||||
{ "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }
|
{
|
||||||
|
"voucherStatusInstanceId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||||
|
}
|
||||||
|
/voucherstatuses:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- References
|
||||||
|
summary: Get voucher statuses.
|
||||||
|
description: Get voucher statuses.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"voucherStatuses":
|
||||||
|
[
|
||||||
|
{ "voucherStatusId": 1, "name": "New" },
|
||||||
|
{ "voucherStatusId": 2, "name": "Issued" },
|
||||||
|
{ "voucherStatusId": 3, "name": "Redeemed" },
|
||||||
|
{ "voucherStatusId": 4, "name": "Revoked" },
|
||||||
|
{ "voucherStatusId": 5, "name": "Expired" },
|
||||||
|
],
|
||||||
|
}
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
bearerToken:
|
bearerToken:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user