OVPAY-2103 - Updated examples existing endpoints.

This commit is contained in:
Bas Boterman 2025-11-27 12:23:09 +01:00
parent 6f95cee75e
commit 8f93fb03fd

View File

@ -80,7 +80,11 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
Empty list:
value: { "purchasedProducts": [], "href": null }
List with multiple purchased products:
value:
{ {
"purchasedProducts": "purchasedProducts":
[ [
@ -94,7 +98,10 @@ paths:
{ {
"purchasedProductResourceId": "c7900130-0637-41d7-83fe-6fe283a0a1f1", "purchasedProductResourceId": "c7900130-0637-41d7-83fe-6fe283a0a1f1",
"resourceName": "resourceName":
{ "resourceNameId": 1, "name": "contracts" }, {
"resourceNameId": 1,
"name": "contracts",
},
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7", "resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
}, },
{ {
@ -124,6 +131,95 @@ paths:
"lastUpdatedBy": null, "lastUpdatedBy": null,
}, },
], ],
"purchasedTapconnectTickets": [],
"issuedVouchers": [],
},
{
"purchasedProductId": "599f1296-ed56-4b90-a518-5c8e917a7dd6",
"productId": 12,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"purchasedProductResourceId": "c7900130-0637-41d7-83fe-6fe283a0a1f1",
"resourceName":
{
"resourceNameId": 1,
"name": "contracts",
},
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"purchasedProductResourceId": "06dae996-cdfe-45f1-833a-720201c35114",
"resourceName":
{ "resourceNameId": 2, "name": "orders" },
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets":
[
{
"purchasedTapconnectTicketId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
"issuedAt": "2024-10-04T12:34:56.000",
"activatedAt": "2024-10-04T12:34:56.000",
"cancelledAt": null,
"ticketReference": "KJj43nejhbTxhr897287",
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user",
"lastUpdatedBy": "user",
},
],
"issuedVouchers": [],
},
{
"purchasedProductId": "2c97c451-3bd5-467b-8db0-fd3a04fe5bc6",
"productId": 12,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"purchasedProductResourceId": "c7900130-0637-41d7-83fe-6fe283a0a1f1",
"resourceName":
{
"resourceNameId": 1,
"name": "contracts",
},
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"purchasedProductResourceId": "06dae996-cdfe-45f1-833a-720201c35114",
"resourceName":
{ "resourceNameId": 2, "name": "orders" },
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
"voucherCode": "VOUCHER12345",
"voucherStatus":
{ "voucherStatusId": 1, "name": "Active" },
"voucherClaims":
[
{
"voucherClaimId": "b1c2d3e4-f5g6-h7i8-j9k0-l1m2n3o4p5q6",
"mandatoryCustomerDataItem":
{
"mandatoryCustomerDataItemId": 8,
"name": "PadBirthdate",
},
"value": "1990-01-01",
},
],
},
],
}, },
], ],
"href": null, "href": null,
@ -139,7 +235,9 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
Create Purchased GBO Product:
value:
{ {
"productId": 11, "productId": 11,
"createdOn": "2024-10-04T12:34:56.000", "createdOn": "2024-10-04T12:34:56.000",
@ -174,6 +272,79 @@ paths:
"lastUpdatedBy": null, "lastUpdatedBy": null,
}, },
], ],
"purchasedTapconnectTickets": [],
"issuedVouchers": [],
}
Create Purchased TapConnet Ticket:
value:
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets":
[
{
"issuedAt": "2024-10-04T12:34:56.000",
"activatedAt": "2024-10-04T12:34:56.000",
"cancelledAt": null,
"ticketReference": "KJj43nejhbTxhr897287",
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user",
"lastUpdatedBy": "user",
},
],
"issuedVouchers": [],
}
Create Issued Voucher:
value:
{
"productId": 11,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceNameId": 1,
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"voucherCode": "VOUCHER123",
"voucherStatusId": 1,
"voucherClaims":
[
{
"mandatoryCustomerDataItemId": 8,
"value": "1999-12-31",
},
{
"mandatoryCustomerDataItemId": 4,
"value": "vlad.harkonnen@househarkonnen.net",
},
],
},
],
} }
responses: responses:
"201": "201":
@ -206,7 +377,9 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: examples:
Get Purchased GBO Product:
value:
{ {
"purchasedProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd", "purchasedProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
"productId": 14, "productId": 14,
@ -244,6 +417,81 @@ paths:
"lastUpdatedBy": null, "lastUpdatedBy": null,
}, },
], ],
"purchasedTapconnectTickets": [],
"issuedVouchers": [],
}
Get Purchased Tapconnect Ticket:
value:
{
"purchasedProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
"productId": 14,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceName":
{ "resourceNameId": 1, "name": "contracts" },
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceName":
{ "resourceNameId": 2, "name": "orders" },
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets":
[
{
"purchasedTapconnectTicketId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
"issuedAt": "2024-10-04T12:34:56.000",
"activatedAt": "2024-10-04T12:34:56.000",
"cancelledAt": null,
"ticketReference": "KJj43nejhbTxhr897287",
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "user",
"lastUpdatedBy": "user",
},
],
"issuedVouchers": [],
}
Get Issued Voucher:
value:
{
"purchasedProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
"productId": 14,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"purchasedProductResources":
[
{
"resourceName":
{ "resourceNameId": 1, "name": "contracts" },
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
},
{
"resourceName":
{ "resourceNameId": 2, "name": "orders" },
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
},
],
"purchasedGboProducts": [],
"purchasedTapconnectTickets": [],
"issuedVouchers":
[
{
"issuedVoucherId": "e1f2g3h4-i5j6-k7l8-m9n0-o1p2q3r4s5t6",
"voucherCode": "VOUCHER12345",
"redeemedOn": null,
"expiresOn": "2024-12-31T23:59:59.000",
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "admin",
"lastUpdatedBy": "admin",
},
],
} }
patch: patch:
tags: tags:
@ -773,7 +1021,7 @@ paths:
"createdBy": "user", "createdBy": "user",
"lastUpdatedBy": "user", "lastUpdatedBy": "user",
}, },
] ],
} }
/purchasedtapconnecttickets/{purchasedTapconnectTicketId}: /purchasedtapconnecttickets/{purchasedTapconnectTicketId}:
parameters: parameters:
@ -801,7 +1049,6 @@ paths:
"activatedAt": "2024-10-05T12:34:56.000", "activatedAt": "2024-10-05T12:34:56.000",
"cancelledAt": "2024-10-06T12:34:56.000", "cancelledAt": "2024-10-06T12:34:56.000",
"lastUpdatedOn": "2024-10-05T12:34:56.000", "lastUpdatedOn": "2024-10-05T12:34:56.000",
"lastUpdatedBy": "user",
} }
responses: responses:
"200": "200":
@ -841,13 +1088,10 @@ paths:
"voucherStatusId": 1, "voucherStatusId": 1,
"voucherClaims": "voucherClaims":
[ [
{ { "mandatoryCustomerDataItemId": 8, "value": "1999-12-31" },
"mandatoryCustomerDataItemId": 8,
"claimValue": "1999-12-31",
},
{ {
"mandatoryCustomerDataItemId": 4, "mandatoryCustomerDataItemId": 4,
"claimValue": "vlad.harkonnen@househarkonnen.net", "value": "vlad.harkonnen@househarkonnen.net",
}, },
], ],
} }
@ -859,9 +1103,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{ { "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
}
/issuedvouchers: /issuedvouchers:
get: get:
tags: tags:
@ -913,10 +1155,8 @@ 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",
"voucherStatus": { "voucherStatus":
"voucherStatusId": 1, { "voucherStatusId": 1, "name": "New" },
"name": "New",
},
"voucherClaims": "voucherClaims":
[ [
{ {
@ -925,18 +1165,19 @@ paths:
"mandatoryCustomerDataItemId": 8, "mandatoryCustomerDataItemId": 8,
"customerDataItem": "padBirthDate", "customerDataItem": "padBirthDate",
}, },
"claimValue": "1999-12-31", "value": "1999-12-31",
}, },
{ {
"mandatoryCustomerDataItem": { "mandatoryCustomerDataItem":
{
"mandatoryCustomerDataItemId": 4, "mandatoryCustomerDataItemId": 4,
"customerDataItem": "emailAddress", "customerDataItem": "emailAddress",
}, },
"claimValue": "vlad.harkonnen@househarkonnen.net", "value": "vlad.harkonnen@househarkonnen.net",
}, },
], ],
}, },
] ],
} }
/issuedvouchers/{issuedVoucherId}: /issuedvouchers/{issuedVoucherId}:
parameters: parameters:
@ -959,10 +1200,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example: { "voucherStatusId": 2 }
{
"voucherStatusId": 2,
}
responses: responses:
"200": "200":
description: OK description: OK
@ -971,9 +1209,7 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{ { "issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90" }
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
}
components: components:
securitySchemes: securitySchemes:
bearerToken: bearerToken: