OVPAY-1136 - Order validation V2.

This commit is contained in:
Bas Boterman 2024-10-09 10:17:43 +02:00
parent 5a872acca6
commit a411e60968

View File

@ -28,55 +28,65 @@ paths:
example: example:
{ {
"purchaseDate": "2024-03-22", "purchaseDate": "2024-03-22",
"touchPointId": 1, "customerProfileId": 1337,
"customerProfileId": 1, "languageId": 1,
"billingAddressId": 1,
"shippingAddressId": 1,
"contents": "contents":
[ [
{ {
"productId": 1, "productId": 1,
"quantity": 5, "quantity": 5,
"personalization": "validFrom": "2024-03-22T09:00:00",
{ "validUntil": null,
"gboProduct": "tokens":
[
{ {
"tokenTypeId": 1,
"ovPayTokenId": 1, "ovPayTokenId": 1,
"serviceReferenceId": "NLOV1234567ABCDEFG", "serviceReferenceId": "NLOV1234567ABCDEFG",
"amount": 34, "amount": 34,
"ovpasNumber": "OV34567", "ovpasNumber": "OV34567",
"verificationCode": "A7H6", "verificationCode": "A7H6",
"startDate": "2024-03-22", "personalAccountData":
},
"tapconnectProduct":
{ {
"ticketLanguage": "NL", "name": "Jan de Vries",
"validityStart": "2024-03-22", "dateOfBirth": "01-01-1970",
"validityStartTime": "10:30", "photoReference": "DSC_0502.JPG",
"fileType": "image/jpg",
"challengeTypeId": 1,
"oneTimePassword": "H5Iiz3JTaQeIV8p",
}, },
}, },
],
}, },
{ {
"productId": 2, "productId": 2,
"quantity": 3, "quantity": 3,
"personalization": "validFrom": "2024-03-22T09:00:00",
{ "validUntil": null,
"gboProduct":
{
"ovPayTokenId": 2,
"serviceReferenceId": "NLOV1234567ABCDEFG",
"amount": 34,
"ovpasNumber": "OV34567",
"verificationCode": "A7H6",
"startDate": "2024-03-22",
},
"tapconnectProduct":
{
"ticketLanguage": "NL",
"validityStart": "2024-03-22",
"validityStartTime": "10:30",
},
},
}, },
], ],
"customer":
{
"birthname": "Jan",
"surname": "Vries",
"prefix": "de",
"emailAddress": "jandevries@outlook.com",
"dateOfBirth": "1970-01-01",
"addresses":
[
{
"addressTypeId": 1,
"street": "Kon. Julianaplein",
"houseNumber": 10,
"houseNumberSuffix": "a",
"postalCode": "2595 AA",
"city": "Den Haag",
"country": "NL",
},
],
},
} }
responses: responses:
"201": "201":
@ -88,99 +98,94 @@ paths:
example: example:
{ {
"validContents": true, "validContents": true,
"amountExclTax": 200,
"taxPercentage": 21,
"amountInclTax": 242,
"purchaseDate": "2024-03-22", "purchaseDate": "2024-03-22",
"touchPointId": 1, "customerProfileId": 1337,
"customerProfileId": 1, "languageId": 1,
"billingAddressId": 1,
"shippingAddressId": 1,
"totalAmount": 121,
"contents": "contents":
[ [
{ {
"productId": 1, "productId": 1,
"quantity": 5, "quantity": 5,
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
"taxAmount": 21,
"taxCode": "V21",
"amountExclTax": 100, "amountExclTax": 100,
"taxPercentage": 21,
"amountInclTax": 121, "amountInclTax": 121,
"personalization": "isRenewable": true,
{ "nextDebitDate": "2024-04-22",
"gboProduct": "termAmountExclTax": 100,
"termAmountInclTax": 121,
"tokens":
[
{ {
"tokenTypeId": 1,
"ovPayTokenId": 1, "ovPayTokenId": 1,
"serviceReferenceId": "NLOV1234567ABCDEFG", "serviceReferenceId": "NLOV1234567ABCDEFG",
"amount": 34, "amount": 34,
"ovpasNumber": "OV34567", "ovpasNumber": "OV34567",
"verificationCode": "A7H6", "verificationCode": "A7H6",
"startDate": "2024-03-22", "personalAccountData":
"endDate": null,
"isRenewable": true,
"nextDebitDate": "2024-04-22",
"termAmountExclTax": 100,
"termAmountInclTax": 121,
},
"tapconnectProduct":
{ {
"ticketLanguage": "NL", "name": "Jan de Vries",
"validityStart": "2020-03-22", "dateOfBirth": "01-01-1970",
"validityStartTime": "10:30", "photoReference": "DSC_0502.JPG",
"fileType": "image/jpg",
"challengeTypeId": 1,
"oneTimePassword": "H5Iiz3JTaQeIV8p",
}, },
}, },
"additionalRemarks":
[
{
"code": "PERSONAL_DATA_NEEDED",
"parameter": "dateOfBirth",
},
{
"code": "PERSONAL_DATA_NEEDED",
"parameter": "photo",
},
{
"code": "MANDATE_REQUIRED",
"parameter": "directDebitMandateId",
},
], ],
"additionalRemarks": [],
"validationErrors": "validationErrors":
[ [
{ {
"detail": "Startdate of this product should be at most 60 days in the future.", "detail": "Startdate of this product should be at most 60 days in the future.",
"pointer": "#/contents[0]/personalization/gboProduct/startDate", "pointer": "#/contents[0]/validFrom",
}, },
{ {
"detail": "Combination of product and token type is not valid.", "detail": "Combination of product and token type is not valid.",
"pointer": "#/contents[0]/personalization/gboProduct/ovPayTokenId", "pointer": "#/contents[0]/tokens[0]/ovPayTokenId",
}, },
], ],
}, },
{ {
"productId": 2, "productId": 2,
"quantity": 3, "quantity": 3,
"validFrom": "2024-03-22T09:00:00",
"validUntil": null,
"taxAmount": 21,
"taxCode": "V21",
"amountExclTax": 100, "amountExclTax": 100,
"taxPercentage": 21,
"amountInclTax": 121, "amountInclTax": 121,
"personalization":
{
"gboProduct":
{
"ovPayTokenId": 1,
"serviceReferenceId": "NLOV1234567ABCDEFG",
"amount": 34,
"ovpasNumber": "OV34567",
"verificationCode": "A7H6",
"startDate": "2024-03-22",
"endDate": null,
"isRenewable": true, "isRenewable": true,
"nextDebitDate": "2024-04-22", "nextDebitDate": "2024-04-22",
"termAmountExclTax": 100, "termAmountExclTax": 100,
"termAmountInclTax": 121, "termAmountInclTax": 121,
}, },
"tapconnectProduct": ],
"customer":
{ {
"ticketLanguage": "NL", "birthname": "Jan",
"validityStart": "2020-03-22", "surname": "Vries",
"validityStartTime": "10:30", "prefix": "de",
}, "emailAddress": "jandevries@outlook.com",
"dateOfBirth": "1970-01-01",
"addresses":
[
{
"addressTypeId": 1,
"street": "Kon. Julianaplein",
"houseNumber": 10,
"houseNumberSuffix": "a",
"postalCode": "2595 AA",
"city": "Den Haag",
"country": "NL",
}, },
],
"additionalRemarks": "additionalRemarks":
[ [
{ {
@ -200,15 +205,10 @@ paths:
[ [
{ {
"detail": "Startdate of this product should be at most 60 days in the future.", "detail": "Startdate of this product should be at most 60 days in the future.",
"pointer": "#/contents[1]/personalization/gboProduct/startDate", "pointer": "#/contents[1]/validFrom",
},
{
"detail": "Combination of product and token type is not valid.",
"pointer": "#/contents[1]/personalization/gboProduct/ovPayTokenId",
}, },
], ],
}, },
],
} }
/orders/{orderId}/fulfillment: /orders/{orderId}/fulfillment:
post: post: