Added metadata in VoucherSupplier GET/POST, re-added POST purchasedproduct CRUD
This commit is contained in:
parent
7953e035bb
commit
6a0e5a5fba
@ -319,9 +319,14 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"customerDataItem": "padBirthDate",
|
||||
},
|
||||
"value": "1980-06-31",
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
]
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -372,7 +377,12 @@ paths:
|
||||
}
|
||||
}
|
||||
},
|
||||
"voucherClaims":[]
|
||||
"voucherClaims":[],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
},
|
||||
]
|
||||
}
|
||||
@ -408,7 +418,12 @@ paths:
|
||||
}
|
||||
}
|
||||
},
|
||||
"voucherClaims":[]
|
||||
"voucherClaims":[],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -516,9 +531,14 @@ paths:
|
||||
[
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"value": "1980-06-31",
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
Issue a voucher and receive a voucher code (generated by ABT backend) in response:
|
||||
summary: Issue a voucher and receive a voucher code (generated by ABT backend) in response
|
||||
@ -534,9 +554,14 @@ paths:
|
||||
[
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"value": "1980-06-31",
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
@ -594,9 +619,14 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"customerDataItem": "padBirthDate",
|
||||
},
|
||||
"value": "1980-06-31",
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
"400":
|
||||
description: Bad request
|
||||
@ -736,9 +766,14 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"customerDataItem": "padBirthDate",
|
||||
},
|
||||
"value": "1980-06-31",
|
||||
"value": "1980-06-30",
|
||||
}
|
||||
]
|
||||
],
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null
|
||||
}
|
||||
"400":
|
||||
description: Bad request
|
||||
@ -779,7 +814,6 @@ components:
|
||||
- validityPeriod
|
||||
- productCategory
|
||||
- sellingPeriods
|
||||
|
||||
properties:
|
||||
productId:
|
||||
type: integer
|
||||
@ -1021,6 +1055,26 @@ components:
|
||||
type: string
|
||||
description: The value that the customer must provide for this mandatoryCustomerDataItem to be able to redeem the voucher.
|
||||
example: "1970-01-01"
|
||||
metadata1:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata2:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata3:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata4:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata5:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
supplierTouchpointUpdateIssuedVoucherRequest:
|
||||
type: object
|
||||
required:
|
||||
@ -1213,7 +1267,26 @@ components:
|
||||
value:
|
||||
type: string
|
||||
example: 1970-01-01
|
||||
|
||||
metadata1:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata2:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata3:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata4:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
metadata5:
|
||||
type: string
|
||||
description: Field for storing custom metadata.
|
||||
example: "Some metadata"
|
||||
unavailable:
|
||||
type: object
|
||||
rfc9457:
|
||||
|
||||
@ -256,6 +256,155 @@ paths:
|
||||
],
|
||||
"href": null,
|
||||
}
|
||||
post:
|
||||
tags:
|
||||
- Purchased Product
|
||||
summary: Create a new purchased product.
|
||||
description: Create a new purchased product. Only one single instance of `purchasedGboProducts`, `purchasedTapconnectTickets` or `issuedVouchers` can be specified at once.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
examples:
|
||||
Create Purchased GBO Product:
|
||||
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":
|
||||
[
|
||||
{
|
||||
"salesTimestamp": "2024-10-04T12:34:56.000",
|
||||
"refundTimestamp": "2024-10-04T12:34:56.000",
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
"untilInclusive": "2024-10-04T12:34:56.000",
|
||||
"packageTemplateId": "30003",
|
||||
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
|
||||
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
|
||||
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
|
||||
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
|
||||
"ovPayTokenId": 13,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"createdBy": "someuser",
|
||||
"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": "2024-10-04T12:34:56.000",
|
||||
"ticketReference": "KJj43nejhbTxhr897287",
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"createdBy": "John Doe",
|
||||
"lastUpdatedBy": "John Doe",
|
||||
"externalDeviceId": "c5545584-04af-4c60-a955-d6a70baab848",
|
||||
"serviceId": "HTM-1234-7654-8945",
|
||||
"activateBefore": "2024-10-08",
|
||||
"validityStart": "2024-10-05T12:34:56.000",
|
||||
"validityEnd": "2024-10-06T12:34:56.000"
|
||||
},
|
||||
],
|
||||
"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",
|
||||
"touchpointId": 23,
|
||||
"metadata1": null,
|
||||
"metadata2": null,
|
||||
"metadata3": null,
|
||||
"metadata4": null,
|
||||
"metadata5": null,
|
||||
"voucherStatusInstances": [
|
||||
{
|
||||
"voucherStatusId": 1,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"reason": "test reason"
|
||||
}
|
||||
],
|
||||
"voucherClaims": [
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 8,
|
||||
"value": "1999-12-31"
|
||||
},
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 4,
|
||||
"value": "john.doe@example.com"
|
||||
}
|
||||
],
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
"untilInclusive": "2025-10-04T12:34:56.000"
|
||||
},
|
||||
],
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
description: Created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{ "purchasedProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd" }
|
||||
/purchasedproducts/{purchasedProductId}:
|
||||
parameters:
|
||||
- in: path
|
||||
@ -1089,7 +1238,7 @@ paths:
|
||||
{ "mandatoryCustomerDataItemId": 8, "value": "1999-12-31" },
|
||||
{
|
||||
"mandatoryCustomerDataItemId": 4,
|
||||
"value": "vlad.harkonnen@househarkonnen.net",
|
||||
"value": "john.doe@example.com",
|
||||
},
|
||||
],
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
@ -1216,7 +1365,7 @@ paths:
|
||||
"mandatoryCustomerDataItemId": 4,
|
||||
"customerDataItem": "emailAddress",
|
||||
},
|
||||
"value": "vlad.harkonnen@househarkonnen.net",
|
||||
"value": "john.doe@example.com",
|
||||
},
|
||||
],
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user