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":
{ [
"ovPayTokenId": 1, {
"serviceReferenceId": "NLOV1234567ABCDEFG", "tokenTypeId": 1,
"amount": 34, "ovPayTokenId": 1,
"ovpasNumber": "OV34567", "serviceReferenceId": "NLOV1234567ABCDEFG",
"verificationCode": "A7H6", "amount": 34,
"startDate": "2024-03-22", "ovpasNumber": "OV34567",
}, "verificationCode": "A7H6",
"tapconnectProduct": "personalAccountData":
{ {
"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,127 +98,117 @@ 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,
"ovPayTokenId": 1, "tokens":
"serviceReferenceId": "NLOV1234567ABCDEFG",
"amount": 34,
"ovpasNumber": "OV34567",
"verificationCode": "A7H6",
"startDate": "2024-03-22",
"endDate": null,
"isRenewable": true,
"nextDebitDate": "2024-04-22",
"termAmountExclTax": 100,
"termAmountInclTax": 121,
},
"tapconnectProduct":
{
"ticketLanguage": "NL",
"validityStart": "2020-03-22",
"validityStartTime": "10:30",
},
},
"additionalRemarks":
[ [
{ {
"code": "PERSONAL_DATA_NEEDED", "tokenTypeId": 1,
"parameter": "dateOfBirth", "ovPayTokenId": 1,
}, "serviceReferenceId": "NLOV1234567ABCDEFG",
{ "amount": 34,
"code": "PERSONAL_DATA_NEEDED", "ovpasNumber": "OV34567",
"parameter": "photo", "verificationCode": "A7H6",
}, "personalAccountData":
{ {
"code": "MANDATE_REQUIRED", "name": "Jan de Vries",
"parameter": "directDebitMandateId", "dateOfBirth": "01-01-1970",
"photoReference": "DSC_0502.JPG",
"fileType": "image/jpg",
"challengeTypeId": 1,
"oneTimePassword": "H5Iiz3JTaQeIV8p",
},
}, },
], ],
"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": "isRenewable": true,
{ "nextDebitDate": "2024-04-22",
"gboProduct": "termAmountExclTax": 100,
{ "termAmountInclTax": 121,
"ovPayTokenId": 1,
"serviceReferenceId": "NLOV1234567ABCDEFG",
"amount": 34,
"ovpasNumber": "OV34567",
"verificationCode": "A7H6",
"startDate": "2024-03-22",
"endDate": null,
"isRenewable": true,
"nextDebitDate": "2024-04-22",
"termAmountExclTax": 100,
"termAmountInclTax": 121,
},
"tapconnectProduct":
{
"ticketLanguage": "NL",
"validityStart": "2020-03-22",
"validityStartTime": "10:30",
},
},
"additionalRemarks":
[
{
"code": "PERSONAL_DATA_NEEDED",
"parameter": "dateOfBirth",
},
{
"code": "PERSONAL_DATA_NEEDED",
"parameter": "photo",
},
{
"code": "MANDATE_REQUIRED",
"parameter": "directDebitMandateId",
},
],
"validationErrors":
[
{
"detail": "Startdate of this product should be at most 60 days in the future.",
"pointer": "#/contents[1]/personalization/gboProduct/startDate",
},
{
"detail": "Combination of product and token type is not valid.",
"pointer": "#/contents[1]/personalization/gboProduct/ovPayTokenId",
},
],
}, },
], ],
"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",
},
],
"additionalRemarks":
[
{
"code": "PERSONAL_DATA_NEEDED",
"parameter": "dateOfBirth",
},
{
"code": "PERSONAL_DATA_NEEDED",
"parameter": "photo",
},
{
"code": "MANDATE_REQUIRED",
"parameter": "directDebitMandateId",
},
],
"validationErrors":
[
{
"detail": "Startdate of this product should be at most 60 days in the future.",
"pointer": "#/contents[1]/validFrom",
},
],
},
} }
/orders/{orderId}/fulfillment: /orders/{orderId}/fulfillment:
post: post: