From b7ff9055e5e6687ecb261d05e4377069853a2395 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Fri, 9 May 2025 17:19:18 +0200 Subject: [PATCH] Finish /transfer spec, add schema for request body for /compare and /transfer --- src/openapi/customers/SE-customers.yaml | 119 +++++++++++++++++++++--- 1 file changed, 105 insertions(+), 14 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index 63a655e..be828a7 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -1808,7 +1808,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/CompareRequest" examples: Compare with an existing OVpay token: value: { "ovPayTokenId": 2 } @@ -2259,8 +2259,8 @@ paths: post: summary: "**INTEGRATIELAAG** Transfer old OVpay token to new OVpay token." description: |- - **Note that this is an integratielaag endpoint, not a service eninge endpoint!** - Transfers all products, e-purse and personal account data of an existing OVpay token + **Note that this is an integratielaag endpoint, not a Service Engine endpoint!** + First transfers all personal account data (if present), then all products, of an existing OVpay token to a new OVpay token. The new token will also be persisted in the profile as a replacement of the old token. tags: @@ -2269,21 +2269,25 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" + $ref: "#/components/schemas/TransferRequest" examples: Transfer of a token without PAD to an existing OVpay token: value: { "oldOvPayToken": {}, - "newOvPayToken": { "ovPayTokenId": 2 }, + "newOvPayToken": + { + "ovPayTokenId": 2, + "alias": "MyToken" + } } - Transfer of a token without PAD to a new OVpay token by XTAT: + Transfer of a token without PAD to a new OVpay token by xTAT: value: { "oldOvPayToken": {}, "newOvPayToken": { - "xtat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", + "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "alias": "MyToken", }, } @@ -2295,15 +2299,21 @@ paths: { "ovPayTokenId": 2, "padEmailAddress": "jandevries@outlook.com", + "alias": "MyToken", }, } Transfer of a token with PAD to an existing OVpay token with existing PAD: value: { "oldOvPayToken": { "padOtp": "123456" }, - "newOvPayToken": { "ovPayTokenId": 2, "padOtp": "678901" }, + "newOvPayToken": + { + "ovPayTokenId": 2, + "padOtp": "678901", + "alias": "MyToken" + }, } - Transfer of a token with PAD to a new token by XTAT without existing PAD: + Transfer of a token with PAD to a new token by xTAT without existing PAD with e-mail verification by OTP: value: { "oldOvPayToken": { "padOtp": "123456" }, @@ -2312,15 +2322,17 @@ paths: "xtat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "alias": "MyToken", "padEmailAddress": "jandevries@outlook.com", + "padOtp": "678901", }, } - Transfer of a token with PAD to a new token by XTAT with existing PAD: + Transfer of a token with PAD to a new token by SRID and amount, with existing PAD: value: { "oldOvPayToken": { "padOtp": "123456" }, "newOvPayToken": { - "xtat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 230, "alias": "MyToken", "padOtp": "678901", }, @@ -2452,7 +2464,7 @@ paths: { "detail": "The old token was not found in the customer profile.", "pointer": "#/0/ovPayTokenId", - "ovPayTokenId": 123, + "ovPayTokenId": 1, }, ], } @@ -2468,7 +2480,7 @@ paths: { "detail": "The new token was not found in the customer profile.", "pointer": "#/0/ovPayTokenId", - "ovPayTokenId": 123, + "ovPayTokenId": 2, }, ], } @@ -2555,7 +2567,7 @@ paths: { "detail": "The new token is expired.", "pointer": "#/0/ovPayToken/expirationDate", - "experiationDate": 2022-01-01, + "experiationDate": "2022-01-01", }, ], } @@ -2594,6 +2606,85 @@ components: schemas: unavailable: type: object + CompareRequest: + type: object + properties: + ovPayTokenId: + type: integer + example: 1 + description: When new token is already present in customer profile + xBOT: + type: string + format: uuid + example: "91641b54-056c-49ea-b598-ccde81d6c45a" + xTAT: + type: string + format: uuid + example: "4c2d60e2-cd03-4c80-ae70-573a301f0bff" + serviceReferenceId: + type: string + example: "NLOV1234567ABCDEFG" + description: When provided, amount is also required + amount: + type: integer + example: 100 + description: When provided, serviceReferenceId is also required + ovpasNumber: + type: string + example: "OV34567" + description: When provided, verificationCode is also required + verificationCode: + type: string + example: "1234" + description: When provided, ovpasNumber is also required + TransferRequest: + type: object + required: + - oldOvPayToken + - newOvPayToken + properties: + oldOvPayToken: + type: object + properties: + padOtp: + type: string + pattern: ^[0-9]{6}$ + example: "023456" + newOvPayToken: + type: object + properties: + ovPayTokenId: + type: integer + example: 1 + description: When new token is already present in customer profile + xBOT: + type: string + format: uuid + example: "91641b54-056c-49ea-b598-ccde81d6c45a" + xTAT: + type: string + format: uuid + example: "4c2d60e2-cd03-4c80-ae70-573a301f0bff" + serviceReferenceId: + type: string + example: "NLOV1234567ABCDEFG" + description: When provided, amount is also required + amount: + type: integer + example: 100 + description: When provided, serviceReferenceId is also required + padOtp: + type: string + pattern: ^[0-9]{6}$ + example: "123456" + description: Can be xTAT-based OTP (for existing PAD), or email-based OTP (for new PAD). In the latter case, padEmailAddress should be the same address as used for the OTP! + padEmailAddress: + type: string + format: email + example: 8Z9dG@example.com + alias: + type: string + example: MyNewToken CustomersResponse: type: object properties: