From ea5a3aee698217ec9f9d9860d51313ff40f8a6fc Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 12 May 2025 17:01:00 +0200 Subject: [PATCH] OVPAY-1742 - Split /transfer into old and new endpoint. --- src/openapi/customers/SE-customers.yaml | 283 ++++++++++++++++++++++-- 1 file changed, 270 insertions(+), 13 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index c556167..70ffc85 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -1157,8 +1157,10 @@ paths: type: integer example: 1 required: true - summary: Replace an OVpay token with another (+ transfer products) - description: Transfer products from one OVpay token to another, and replace the tokens in the database + summary: Replace an OVpay token with another (+ transfer products) - V1 (for touch point) + description: | + Transfer products from one OVpay token to another, and replace the tokens in the database. + This endpoint is for touch point usage and will be replaced by `/customers/tokens/{ovpayTokenId}/transfer`. requestBody: content: application/json: @@ -1196,17 +1198,6 @@ paths: "alias": "Mijn token", }, } - Replace with new token by XTAT: - summary: Replace with new token by XTAT - description: Replace with new token by XTAT. - value: - { - "ovPayToken": - { - "xtat": "32089cc8-d187-47ff-a3a9-5c2558def811", - "alias": "Mijn token", - }, - } responses: "201": description: Created @@ -1698,6 +1689,272 @@ paths: responses: "200": description: Ok + /customers/tokens/{ovpayTokenId}/replace: + post: + tags: + - Customers + 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: ovpayTokenId + in: path + schema: + type: integer + example: 1 + required: true + summary: Replace an OVpay token with another (+ transfer products) - V2 (for Integratielaag) + description: | + Transfer products from one OVpay token to another, and replace the tokens in the database. + This endpoint is for usage by integratielaag only. Touch points should use + `/customers/tokens/{ovpayTokenId}/transfer` instead. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Replace with existing token from profile: + summary: Replace with existing token from profile + description: Replace with existing token from customer profile. + value: { "ovPayToken": { "newTokenId": 10 } } + Replace with new token by XTAT: + summary: Replace with new token by XTAT + description: Replace with new token by XTAT. + value: + { + "ovPayToken": + { + "xtat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "alias": "Mijn token", + }, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Replace with new EMV token: + summary: Replace with new EMV token + description: Replace with new EMV token + value: + { + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 5, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "tokenType": { "tokenTypeId": 1, "name": "EMV" }, + "lastDigits": null, + "ovpasNumber": null, + "alias": "Mijn token", + "tokenStatus": + { "tokenStatusId": 2, "name": "Active" }, + "expirationDate": "2028-08-31T23:59:00+02:00", + "replacedByTokenId": null, + "autoReloadRegistration": null, + "ePurse": null, + "personalAccountData": + { "name": null, "birthdate": null, "photo": null }, + "_links": + { + "self": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovpaytokenId=5", + "method": "GET", + }, + "partial_edit": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5", + "method": "PATCH", + }, + "delete_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5", + "method": "DELETE", + }, + "get_productinstances": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/productinstances", + "method": "GET", + }, + "get_trips": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/trips", + "method": "GET", + }, + "add_personal-data": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811", + "method": "POST", + }, + "compare_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/compare", + "method": "POST", + }, + }, + }, + } + Replace with new OV pas token: + summary: Replace with new OV pas token + description: Replace with new OV pas token + value: + { + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 5, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "tokenType": + { "tokenTypeId": 2, "name": "OV-pas physical" }, + "lastDigits": null, + "ovpasNumber": "OV34567", + "alias": "Mijn token", + "tokenStatus": + { "tokenStatusId": 2, "name": "Active" }, + "expirationDate": "2028-08-31T23:59:00+02:00", + "replacedByTokenId": null, + "autoReloadRegistration": null, + "ePurse": + { + "e-PurseBalance": + { "currency": "EUR", "amount": 350 }, + "status": "ACTIVE", + "originDate": "2024-07-16T11:00:00+02:00", + }, + "personalAccountData": + { "name": null, "birthdate": null, "photo": null }, + "_links": + { + "self": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovpaytokenId=5", + "method": "GET", + }, + "partial_edit": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5", + "method": "PATCH", + }, + "delete_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5", + "method": "DELETE", + }, + "get_productinstances": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/productinstances", + "method": "GET", + }, + "get_trips": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/trips", + "method": "GET", + }, + "add_personal-data": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811", + "method": "POST", + }, + "compare_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/5/compare", + "method": "POST", + }, + }, + }, + } + "200": + description: Ok + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + Replace with existing EMV token: + summary: Replace with existing EMV token + description: Replace with existing EMV token + value: + { + "ovPayToken": + { + "customerProfileId": 1, + "ovPayTokenId": 10, + "xTat": "32089cc8-d187-47ff-a3a9-5c2558def811", + "tokenType": { "tokenTypeId": 1, "name": "EMV" }, + "lastDigits": null, + "ovpasNumber": null, + "alias": "Mijn bestaande token", + "tokenStatus": + { "tokenStatusId": 2, "name": "Active" }, + "expirationDate": "2028-08-31T23:59:00+02:00", + "replacedByTokenId": null, + "autoReloadRegistration": null, + "ePurse": null, + "personalAccountData": + { "name": null, "birthdate": null, "photo": null }, + "_links": + { + "self": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens?ovpaytokenId=10", + "method": "GET", + }, + "partial_edit": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10", + "method": "PATCH", + }, + "delete_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10", + "method": "DELETE", + }, + "get_productinstances": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10/productinstances", + "method": "GET", + }, + "get_trips": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10/trips", + "method": "GET", + }, + "add_personal-data": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/personal-data/32089cc8-d187-47ff-a3a9-5c2558def811", + "method": "POST", + }, + "compare_token": + { + "href": "https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens/10/compare", + "method": "POST", + }, + }, + }, + } + /customers/tokens/{ovPayTokenId}/productinstances: get: tags: