feature/OVPAY2313-swagger-infoplaza #47
@ -359,7 +359,6 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/CustomersResponse"
|
$ref: "#/components/schemas/CustomersResponse"
|
||||||
|
|
||||||
/customers/tokens:
|
/customers/tokens:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -2223,8 +2222,10 @@ paths:
|
|||||||
"productInstances":
|
"productInstances":
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
"productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2",
|
||||||
"productId": 1,
|
"productId": 1,
|
||||||
"name": "HTM 90% Korting",
|
"name": "HTM 90% Korting",
|
||||||
|
"purchasedProductType": "GBO",
|
||||||
|
|
|||||||
"status": "Active",
|
"status": "Active",
|
||||||
"isRenewable": true,
|
"isRenewable": true,
|
||||||
"productCategory":
|
"productCategory":
|
||||||
@ -2237,13 +2238,9 @@ paths:
|
|||||||
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
|
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
||||||
"contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
|
"contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
|
||||||
|
"tapConnectPurchasedProduct": null,
|
||||||
"_links":
|
"_links":
|
||||||
{
|
{
|
||||||
"self":
|
|
||||||
{
|
|
||||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances/1",
|
|
||||||
"method": "GET",
|
|
||||||
},
|
|
||||||
"get_order":
|
"get_order":
|
||||||
{
|
{
|
||||||
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
@ -3398,6 +3395,209 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
|
/customers/devices/{deviceId}/productinstances:
|
||||||
|
parameters:
|
||||||
|
- name: X-HTM-JWT-AUTH-HEADER
|
||||||
|
in: header
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||||
|
required: false
|
||||||
|
description: The JWT of a customer in case of touchpoint were customer logs in themselves
|
||||||
|
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
|
||||||
|
in: header
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: feaaef83-a551-4283-8419-340b1ada3b55
|
||||||
|
required: false
|
||||||
|
description: The customerProfileId of a customer in the case of the SMP
|
||||||
|
- name: X-HTM-ROLE-HEADER
|
||||||
|
in: header
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: Customer
|
||||||
|
required: false
|
||||||
|
- name: deviceId
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
style: simple
|
||||||
|
description: Id of the device you want to get the instantiated HTM products for.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
|
||||||
|
get:
|
||||||
|
summary: Get a list of all HTM products instantiated on the given device
|
||||||
|
description: |-
|
||||||
|
Get a list of all HTM products instantiated on the given device.
|
||||||
|
Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances.
|
||||||
|
Where relevant, operations to be performed are returned as HATEOAS links per product-instance.
|
||||||
|
tags:
|
||||||
|
- Devices
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
examples:
|
||||||
|
getEmptyProductInstances:
|
||||||
|
summary: No product-instances found for devi
|
||||||
|
value:
|
||||||
|
productInstances: []
|
||||||
|
getSingleProductInstance:
|
||||||
|
summary: One non-renewable product-instance
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"productInstances":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
|
||||||
|
"productId": 13,
|
||||||
|
"name": "HTM dagkaart",
|
||||||
|
"purchasedProductType": "TapConnect",
|
||||||
|
"status": "Created",
|
||||||
|
"isRenewable": false,
|
||||||
|
"productCategory":
|
||||||
|
{
|
||||||
|
"productCategoryId": 2,
|
||||||
|
"name": "Afgekocht reisrecht",
|
||||||
|
},
|
||||||
|
"fromInclusive": "2024-11-25T13:25:00+01:00",
|
||||||
|
"untilInclusive": null,
|
||||||
|
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
|
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
||||||
|
"contractId": null,
|
||||||
|
"tapConnectPurchasedProduct": {
|
||||||
|
"ticketReference": "KJj43nejhbTxhr897287",
|
||||||
|
"issuedAt": "2020-03-21T00:00:00",
|
||||||
|
"activatedAt": null,
|
||||||
|
"blocked": false,
|
||||||
|
"cancelledAt": null,
|
||||||
|
"fraudDetected": false,
|
||||||
|
"barcode": "barcodeBytes"
|
||||||
|
},
|
||||||
|
"_links":
|
||||||
|
{
|
||||||
|
"get_order":
|
||||||
|
{
|
||||||
|
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
|
"method": "GET",
|
||||||
|
},
|
||||||
|
"patch_productinstance":
|
||||||
|
{
|
||||||
|
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366",
|
||||||
|
"method": "PATCH",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
/customers/productinstances/{productInstanceId}:
|
||||||
|
parameters:
|
||||||
|
- name: X-HTM-JWT-AUTH-HEADER
|
||||||
|
in: header
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
|
||||||
|
required: false
|
||||||
|
description: The JWT of a customer in case of touchpoint were customer logs in themselves
|
||||||
|
- name: X-HTM-CUSTOMER-PROFILE-ID-HEADER
|
||||||
|
in: header
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: feaaef83-a551-4283-8419-340b1ada3b55
|
||||||
|
required: false
|
||||||
|
description: The customerProfileId of a customer in the case of the SMP
|
||||||
|
- name: X-HTM-ROLE-HEADER
|
||||||
|
in: header
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: Customer
|
||||||
|
required: false
|
||||||
|
- name: productInstanceId
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
style: simple
|
||||||
|
description: Id of the product instance you want to change
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
|
||||||
|
patch:
|
||||||
|
summary: Update a productInstance
|
||||||
|
description: |-
|
||||||
|
Update the status of the give productInstance.
|
||||||
|
tags:
|
||||||
|
- Product instances
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
examples:
|
||||||
|
Update a productInstance status to active:
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"status": "Active"
|
||||||
|
}
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
examples:
|
||||||
|
Update a productInstance status to active:
|
||||||
|
summary: Update a productInstance status to active
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"productInstances":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"productInstanceId": "0f0981bf-6d60-4b06-bc55-de1ba325f366",
|
||||||
|
"productId": 13,
|
||||||
|
"name": "HTM dagkaart",
|
||||||
|
"purchasedProductType": "TapConnect",
|
||||||
|
"status": "Active",
|
||||||
|
bboterm
commented
Waar komt dit veld Waar komt dit veld `status` eigenlijk vandaan? En als je het patcht, waar slaat ie dat op in de dbase?
maxmartens
commented
Status is geen DB veld, maar wordt door SE gegenereerd; voor GBO producten op basis van de xspit ingangs/einddatum + status. Zie OVPAY-96 voor de logica.. Voor TapConnect moet SE dus iets anders gaan doen qua logica; op basis van TapConnect ticket information response bijvoorbeeld. De PATCH op status wordt dan onder water nasr TapConnect ticket activation endpoint doorgezet. Wat precies de mogelijke waarden zijn daarvoor, moeten we mss wel nog ff concreet maken. Status is geen DB veld, maar wordt door SE gegenereerd; voor GBO producten op basis van de xspit ingangs/einddatum + status. [Zie OVPAY-96 voor de logica.](https://htm-prod.atlassian.net/browse/OVPAY-96).
Voor TapConnect moet SE dus iets anders gaan doen qua logica; op basis van TapConnect ticket information response bijvoorbeeld. De PATCH op status wordt dan onder water nasr TapConnect ticket activation endpoint doorgezet. Wat precies de mogelijke waarden zijn daarvoor, moeten we mss wel nog ff concreet maken.
|
|||||||
|
"isRenewable": false,
|
||||||
|
"productCategory":
|
||||||
|
{
|
||||||
|
"productCategoryId": 2,
|
||||||
|
"name": "Afgekocht reisrecht",
|
||||||
|
},
|
||||||
|
"fromInclusive": "2024-11-25T13:25:00+01:00",
|
||||||
|
"untilInclusive": null,
|
||||||
|
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
|
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
||||||
|
"contractId": null,
|
||||||
|
"tapConnectPurchasedProduct": {
|
||||||
|
"ticketReference": "KJj43nejhbTxhr897287",
|
||||||
|
"issuedAt": "2020-03-21T00:00:00",
|
||||||
|
"activatedAt": "2020-03-21T00:00:00",
|
||||||
|
"blocked": false,
|
||||||
|
"cancelledAt": null,
|
||||||
|
"fraudDetected": false,
|
||||||
|
"barcode": "barcodeBytes"
|
||||||
|
},
|
||||||
|
"_links":
|
||||||
|
{
|
||||||
|
"get_order":
|
||||||
|
{
|
||||||
|
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
|
"method": "GET",
|
||||||
|
},
|
||||||
|
"patch_productinstance":
|
||||||
|
{
|
||||||
|
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366",
|
||||||
|
"method": "PATCH",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
unavailable:
|
unavailable:
|
||||||
|
|||||||
@ -36,6 +36,13 @@ paths:
|
|||||||
example: 42
|
example: 42
|
||||||
required: false
|
required: false
|
||||||
description: The technical id of the customer related to the order.
|
description: The technical id of the customer related to the order.
|
||||||
|
- in: query
|
||||||
|
name: deviceId
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: 181004c2-817a-4479-8aae-7a3faf02e239
|
||||||
|
required: false
|
||||||
|
description: The technical id of the device related to the order.
|
||||||
- in: query
|
- in: query
|
||||||
name: totalAmount
|
name: totalAmount
|
||||||
schema:
|
schema:
|
||||||
@ -115,6 +122,10 @@ paths:
|
|||||||
"orderNumber": "123456",
|
"orderNumber": "123456",
|
||||||
"customerProfileId": 1337,
|
"customerProfileId": 1337,
|
||||||
"totalAmount": 121,
|
"totalAmount": 121,
|
||||||
|
"device":{
|
||||||
|
"deviceId": "8a3a1f90-2a50-4eb6-bc68-26cf0fac3015",
|
||||||
|
"alias": "Mijn mobiel"
|
||||||
|
},
|
||||||
"touchPoint":{
|
"touchPoint":{
|
||||||
"touchPointId": 1,
|
"touchPointId": 1,
|
||||||
"name": "Perplex"
|
"name": "Perplex"
|
||||||
@ -328,6 +339,7 @@ paths:
|
|||||||
"totalAmount": 121,
|
"totalAmount": 121,
|
||||||
"touchPointId": 1,
|
"touchPointId": 1,
|
||||||
"languageId": 1,
|
"languageId": 1,
|
||||||
|
"deviceId": "40132fc5-2371-4974-bdfc-8af16aa8bbd0",
|
||||||
"createdOn": "2024-03-22T09:00:00",
|
"createdOn": "2024-03-22T09:00:00",
|
||||||
"order_OrderStatus":
|
"order_OrderStatus":
|
||||||
[
|
[
|
||||||
@ -483,6 +495,7 @@ paths:
|
|||||||
"orderNumber": "123456",
|
"orderNumber": "123456",
|
||||||
"customerProfileId": 1337,
|
"customerProfileId": 1337,
|
||||||
"totalAmount": 121,
|
"totalAmount": 121,
|
||||||
|
"device": null,
|
||||||
"touchPoint":{
|
"touchPoint":{
|
||||||
"touchPointId": 1,
|
"touchPointId": 1,
|
||||||
"name": "Perplex"
|
"name": "Perplex"
|
||||||
@ -661,6 +674,7 @@ paths:
|
|||||||
"totalAmount": 121,
|
"totalAmount": 121,
|
||||||
"languageId": 1,
|
"languageId": 1,
|
||||||
"lastUpdatedOn": "2024-03-22T09:00:00",
|
"lastUpdatedOn": "2024-03-22T09:00:00",
|
||||||
|
"deviceId": "c4cbc26f-99c3-4068-90e6-29a890d9aee0"
|
||||||
}
|
}
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user
Heb je de
purchasedProductTypezelf geintroduceerd?Deze, alsook productInstanceId en content, heeft Mirjam geintroduceerd. Content ofc voor de TapConnect zaken, productInstanceId tbv het nieuwe PATCH endpoint (het heet in DB purchasedProductId, mss beetje verwarrend maar productInstanceId vind ik stiekem wel mooier, en afnemers kennen DB benaming toch niet).
PurchasedProductType is nu (nog) niet perse nodig, maar kan handig zijn als we ooit alle productinstances in één array terug willen geven.