feature/OVPAY2313-swagger-infoplaza #47

Open
maxmartens wants to merge 3 commits from feature/OVPAY2313-swagger-infoplaza into develop
3 changed files with 2289 additions and 14 deletions

View File

@ -359,7 +359,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/CustomersResponse"
/customers/tokens:
get:
tags:
@ -2210,7 +2209,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/OvPayTokenProductInstancesResponse"
$ref: "#/components/schemas/ProductInstancesResponse"
examples:
getEmptyProductInstances:
summary: No product-instances found on token
@ -2223,8 +2222,10 @@ paths:
"productInstances":
[
{
"productInstanceId": "26d41861-f77e-4666-9cde-2c5c66ace0a2",
"productId": 1,
"name": "HTM 90% Korting",
"purchasedProductType": "GBO",
Review

Heb je de purchasedProductType zelf geintroduceerd?

Heb je de `purchasedProductType` zelf geintroduceerd?
Review

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.

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.
"status": "Active",
"isRenewable": true,
"productCategory":
@ -2237,13 +2238,9 @@ paths:
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
"contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
"content": null,
"_links":
{
"self":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/1/productinstances/1",
"method": "GET",
},
"get_order":
{
"href": "https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E",
@ -3398,6 +3395,209 @@ paths:
responses:
"200":
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/ProductInstancesResponse"
examples:
getEmptyProductInstances:
summary: No product-instances found for devi
value:
productInstances: []
getSingleProductInstance:
summary: One TapConnect 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,
"content": {
"ticketReference": "KJj43nejhbTxhr897287",
"issuedAt": "2020-03-21T00:00:00",
"activatedAt": null,
"blocked": false,
"cancelledAt": null,
"fraudDetected": false,
"barcode": "barcodeBytes"
Review

maxBytes.

maxBytes.
},
"_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",
Review

Waar komt dit veld status eigenlijk vandaan? En als je het patcht, waar slaat ie dat op in de dbase?

Waar komt dit veld `status` eigenlijk vandaan? En als je het patcht, waar slaat ie dat op in de dbase?
Review

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,
"content": {
"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:
schemas:
unavailable:
@ -3786,20 +3986,39 @@ components:
method:
type: string
example: GET
OvPayTokenProductInstancesResponse:
ProductInstancesResponse:
type: object
required:
- productInstances
properties:
productInstances:
type: array
items:
type: object
required:
- productInstanceId
- productId
- name
- status
- purchasedProductType
- isRenewable
- productCategory
- _links
properties:
productInstanceId:
type: string
format: uuid
example: 0f0981bf-6d60-4b06-bc55-de1ba325f366
productId:
type: integer
example: 1
name:
type: string
example: HTM 90% Korting
purchasedProductType:
type: string
description: The type of product instance (e.g. GBO, TapConnect, physical, etc.)
example: GBO
status:
type: string
enum: ["Active", "Ended", "Refunded"]
@ -3840,6 +4059,10 @@ components:
format: uuid
example: 56B17EF-C436-9043-B76C-481797WEB464F
description: Only present for subscriptions/contracts
content:
type: object
description: Custom data for the product-instance, depending on the purchasedProductType
example: null
_links:
type: object
properties:
@ -3854,21 +4077,31 @@ components:
example: GET
get_order:
type: object
description: Always present for any HTM product-instance
properties:
href:
type: string
description: Always present for any HTM product-instance
example: https://api.integratielaag.nl/abt/touchpoint/1.0/orders/501B17EF-36C4-4039-B92C-6517969B464E
method:
type: string
example: GET
get_contract:
type: object
description: Only present for subscriptions/contracts
properties:
href:
type: string
description: Only present for subscriptions/contracts
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F
method:
type: string
example: GET
patch_productinstance:
type: object
description: Only present for TapConnect product-instances that need to be activated
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/productinstances/0f0981bf-6d60-4b06-bc55-de1ba325f366
method:
type: string
example: PATCH

View File

@ -36,6 +36,13 @@ paths:
example: 42
required: false
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
name: totalAmount
schema:
@ -115,6 +122,10 @@ paths:
"orderNumber": "123456",
"customerProfileId": 1337,
"totalAmount": 121,
"device":{
"deviceId": "8a3a1f90-2a50-4eb6-bc68-26cf0fac3015",
"alias": "Mijn mobiel"
},
"touchPoint":{
"touchPointId": 1,
"name": "Perplex"
@ -328,6 +339,7 @@ paths:
"totalAmount": 121,
"touchPointId": 1,
"languageId": 1,
"deviceId": "40132fc5-2371-4974-bdfc-8af16aa8bbd0",
"createdOn": "2024-03-22T09:00:00",
"order_OrderStatus":
[
@ -483,6 +495,7 @@ paths:
"orderNumber": "123456",
"customerProfileId": 1337,
"totalAmount": 121,
"device": null,
"touchPoint":{
"touchPointId": 1,
"name": "Perplex"
@ -661,6 +674,7 @@ paths:
"totalAmount": 121,
"languageId": 1,
"lastUpdatedOn": "2024-03-22T09:00:00",
"deviceId": "c4cbc26f-99c3-4068-90e6-29a890d9aee0"
}
responses:
"200":

File diff suppressed because it is too large Load Diff