Finish /transfer spec, add schema for request body for /compare and /transfer

This commit is contained in:
Max Martens 2025-05-09 17:19:18 +02:00
parent aba341d14b
commit b7ff9055e5

View File

@ -1808,7 +1808,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/CompareRequest"
examples: examples:
Compare with an existing OVpay token: Compare with an existing OVpay token:
value: { "ovPayTokenId": 2 } value: { "ovPayTokenId": 2 }
@ -2259,8 +2259,8 @@ paths:
post: post:
summary: "**INTEGRATIELAAG** Transfer old OVpay token to new OVpay token." summary: "**INTEGRATIELAAG** Transfer old OVpay token to new OVpay token."
description: |- description: |-
**Note that this is an integratielaag endpoint, not a service eninge endpoint!** **Note that this is an integratielaag endpoint, not a Service Engine endpoint!**
Transfers all products, e-purse and personal account data of an existing OVpay token 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 to a new OVpay token. The new token will also be persisted in the profile as a replacement
of the old token. of the old token.
tags: tags:
@ -2269,21 +2269,25 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/TransferRequest"
examples: examples:
Transfer of a token without PAD to an existing OVpay token: Transfer of a token without PAD to an existing OVpay token:
value: value:
{ {
"oldOvPayToken": {}, "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: value:
{ {
"oldOvPayToken": {}, "oldOvPayToken": {},
"newOvPayToken": "newOvPayToken":
{ {
"xtat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "xTat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
"alias": "MyToken", "alias": "MyToken",
}, },
} }
@ -2295,15 +2299,21 @@ paths:
{ {
"ovPayTokenId": 2, "ovPayTokenId": 2,
"padEmailAddress": "jandevries@outlook.com", "padEmailAddress": "jandevries@outlook.com",
"alias": "MyToken",
}, },
} }
Transfer of a token with PAD to an existing OVpay token with existing PAD: Transfer of a token with PAD to an existing OVpay token with existing PAD:
value: value:
{ {
"oldOvPayToken": { "padOtp": "123456" }, "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: value:
{ {
"oldOvPayToken": { "padOtp": "123456" }, "oldOvPayToken": { "padOtp": "123456" },
@ -2312,15 +2322,17 @@ paths:
"xtat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "xtat": "e7fa3392-646b-40e2-95a6-c417dc0b0969",
"alias": "MyToken", "alias": "MyToken",
"padEmailAddress": "jandevries@outlook.com", "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: value:
{ {
"oldOvPayToken": { "padOtp": "123456" }, "oldOvPayToken": { "padOtp": "123456" },
"newOvPayToken": "newOvPayToken":
{ {
"xtat": "e7fa3392-646b-40e2-95a6-c417dc0b0969", "serviceReferenceId": "NLOV1234567ABCDEFG",
"amount": 230,
"alias": "MyToken", "alias": "MyToken",
"padOtp": "678901", "padOtp": "678901",
}, },
@ -2452,7 +2464,7 @@ paths:
{ {
"detail": "The old token was not found in the customer profile.", "detail": "The old token was not found in the customer profile.",
"pointer": "#/0/ovPayTokenId", "pointer": "#/0/ovPayTokenId",
"ovPayTokenId": 123, "ovPayTokenId": 1,
}, },
], ],
} }
@ -2468,7 +2480,7 @@ paths:
{ {
"detail": "The new token was not found in the customer profile.", "detail": "The new token was not found in the customer profile.",
"pointer": "#/0/ovPayTokenId", "pointer": "#/0/ovPayTokenId",
"ovPayTokenId": 123, "ovPayTokenId": 2,
}, },
], ],
} }
@ -2555,7 +2567,7 @@ paths:
{ {
"detail": "The new token is expired.", "detail": "The new token is expired.",
"pointer": "#/0/ovPayToken/expirationDate", "pointer": "#/0/ovPayToken/expirationDate",
"experiationDate": 2022-01-01, "experiationDate": "2022-01-01",
}, },
], ],
} }
@ -2594,6 +2606,85 @@ components:
schemas: schemas:
unavailable: unavailable:
type: object 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: CustomersResponse:
type: object type: object
properties: properties: