OVPAY-2103 - Added endpoints for IssuedVoucher.
This commit is contained in:
parent
bfa400820f
commit
b0360c22be
@ -598,6 +598,166 @@ paths:
|
|||||||
{
|
{
|
||||||
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
|
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
|
||||||
}
|
}
|
||||||
|
/purchasedproducts/{purchasedProductId}/issuedvouchers:
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: purchasedProductId
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 058a1af7-897f-45d5-b691-9cc9161e387f
|
||||||
|
required: true
|
||||||
|
description: The id of the purchased product to process.
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Issued Voucher
|
||||||
|
summary: Add an issued voucher.
|
||||||
|
description: Add an issued voucher.
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"voucherCode": "VOUCHER123",
|
||||||
|
"voucherStatusId": 1,
|
||||||
|
"voucherClaims":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"mandatoryCustomerDataItemId": 8,
|
||||||
|
"claimValue": "1999-12-31",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mandatoryCustomerDataItemId": 4,
|
||||||
|
"claimValue": "vlad.harkonnen@househarkonnen.net",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
description: Created
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||||
|
}
|
||||||
|
/issuedvouchers:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Issued Voucher
|
||||||
|
summary: Find issued vouchers.
|
||||||
|
description: Find issued vouchers.
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: issuedVoucherId
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90
|
||||||
|
description: The id of the issued voucher.
|
||||||
|
- in: query
|
||||||
|
name: purchasedProductId
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 058a1af7-897f-45d5-b691-9cc9161e387f
|
||||||
|
description: The id of the purchased product.
|
||||||
|
- in: query
|
||||||
|
name: voucherCode
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: VOUCHER123
|
||||||
|
description: The code of the voucher.
|
||||||
|
- in: query
|
||||||
|
name: voucherStatusId
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
explode: false
|
||||||
|
required: false
|
||||||
|
description: The status id of the voucher.
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"issuedVouchers":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||||
|
"purchasedProductId": "058a1af7-897f-45d5-b691-9cc9161e387f",
|
||||||
|
"voucherCode": "VOUCHER123",
|
||||||
|
"voucherStatus": {
|
||||||
|
"voucherStatusId": 1,
|
||||||
|
"name": "New",
|
||||||
|
},
|
||||||
|
"voucherClaims":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"mandatoryCustomerDataItem":
|
||||||
|
{
|
||||||
|
"mandatoryCustomerDataItemId": 8,
|
||||||
|
"customerDataItem": "padBirthDate",
|
||||||
|
},
|
||||||
|
"claimValue": "1999-12-31",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mandatoryCustomerDataItem": {
|
||||||
|
"mandatoryCustomerDataItemId": 4,
|
||||||
|
"customerDataItem": "emailAddress",
|
||||||
|
},
|
||||||
|
"claimValue": "vlad.harkonnen@househarkonnen.net",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/issuedvouchers/{issuedVoucherId}:
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: issuedVoucherId
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90
|
||||||
|
required: true
|
||||||
|
description: The id of the issued voucher to process.
|
||||||
|
patch:
|
||||||
|
tags:
|
||||||
|
- Issued Voucher
|
||||||
|
summary: Update an issued voucher.
|
||||||
|
description: Update an issued voucher.
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"voucherStatusId": 2,
|
||||||
|
}
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"issuedVoucherId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f90",
|
||||||
|
}
|
||||||
components:
|
components:
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
bearerToken:
|
bearerToken:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user