Implemented order validation v2.
This commit is contained in:
parent
26b0e5b957
commit
0e58033afe
@ -9,7 +9,7 @@ paths:
|
|||||||
/orders/validation:
|
/orders/validation:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Order Validation
|
- Order Validation v2
|
||||||
summary: Validate order.
|
summary: Validate order.
|
||||||
description: Validate order.
|
description: Validate order.
|
||||||
parameters:
|
parameters:
|
||||||
@ -24,35 +24,196 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/postOrderValidation'
|
$ref: "#/components/schemas/unavailable"
|
||||||
examples:
|
example:
|
||||||
postOrderValidation:
|
{
|
||||||
value:
|
"purchaseDate": "2024-03-01",
|
||||||
- ovPayTokenId: 2
|
"touchPointId": 1,
|
||||||
serviceReferenceId: NLOV1234567ABCDEFG
|
"customerProfileId": 1,
|
||||||
amount: 34
|
"contents":
|
||||||
ovpasNumber: OV34567
|
[
|
||||||
productId: 2
|
{
|
||||||
startDate: 2024-03-22T09:00:00z
|
"productId": 1,
|
||||||
quantity: 1
|
"quantity": 5,
|
||||||
- ovPayTokenId: 3
|
"personalization":
|
||||||
serviceReferenceId: NLOV1234567ABCDEFG
|
{
|
||||||
amount: 89
|
"gboProduct":
|
||||||
ovpasNumber: OV34567
|
{
|
||||||
productId: 4
|
"ovPayTokenId": 1,
|
||||||
startDate: 2024-03-22T09:00:00z
|
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||||
quantity: 4
|
"amount": 34,
|
||||||
|
"ovpasNumber": "OV34567",
|
||||||
|
"verifcationCode": "A7H6",
|
||||||
|
"startDate": "2024-03-22T09:00:00z",
|
||||||
|
},
|
||||||
|
"tapconnectProduct":
|
||||||
|
{
|
||||||
|
"ticketLanguage": "NL",
|
||||||
|
"validityStart": "2024-03-03",
|
||||||
|
"validityStartTime": "10:30",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"productId": 2,
|
||||||
|
"quantity": 3,
|
||||||
|
"personalization":
|
||||||
|
{
|
||||||
|
"gboProduct":
|
||||||
|
{
|
||||||
|
"ovPayTokenId": 2,
|
||||||
|
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||||
|
"amount": 34,
|
||||||
|
"ovpasNumber": "OV34567",
|
||||||
|
"verifcationCode": "A7H6",
|
||||||
|
"startDate": "2024-03-22T09:00:00z",
|
||||||
|
},
|
||||||
|
"tapconnectProduct":
|
||||||
|
{
|
||||||
|
"ticketLanguage": "NL",
|
||||||
|
"validityStart": "2024-03-03",
|
||||||
|
"validityStartTime": "10:30",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Successful
|
description: Successful
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/postCustomerProfileOvPayTokenResponse'
|
$ref: "#/components/schemas/unavailable"
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"validContents": true,
|
||||||
|
"amountExclTax": 200,
|
||||||
|
"taxPercentage": 21,
|
||||||
|
"amountInclTax": 242,
|
||||||
|
"purchaseDate": 1970-01-01,
|
||||||
|
"touchPointId": 1,
|
||||||
|
"customerProfileId": 1,
|
||||||
|
"contents":
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"productId": 1,
|
||||||
|
"quantity": 5,
|
||||||
|
"amountExclTax": 100,
|
||||||
|
"taxPercentage": 21,
|
||||||
|
"amountInclTax": 121,
|
||||||
|
"personalization":
|
||||||
|
{
|
||||||
|
"gboProduct":
|
||||||
|
{
|
||||||
|
"ovPayTokenId": 1,
|
||||||
|
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||||
|
"amount": 34,
|
||||||
|
"ovpasNumber": "OV34567",
|
||||||
|
"verifcationCode": "A7H6",
|
||||||
|
"startDate": "2024-03-22T09:00:00z",
|
||||||
|
"endDate": "string",
|
||||||
|
"isRenewable": true,
|
||||||
|
"nextDebitDate": "string",
|
||||||
|
"termAmountExclTax": 0,
|
||||||
|
"termAmountInclTax": 0,
|
||||||
|
},
|
||||||
|
"tapconnectProduct":
|
||||||
|
{
|
||||||
|
"ticketLanguage": "NL",
|
||||||
|
"validityStart": "2020-03-03",
|
||||||
|
"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": "#/0/startDate",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"detail": "Combination of product and token type is not valid.",
|
||||||
|
"pointer": "#/1/ovPayTokenId",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"productId": 2,
|
||||||
|
"quantity": 3,
|
||||||
|
"amountExclTax": 100,
|
||||||
|
"taxPercentage": 21,
|
||||||
|
"amountInclTax": 121,
|
||||||
|
"personalization":
|
||||||
|
{
|
||||||
|
"gboProduct":
|
||||||
|
{
|
||||||
|
"ovPayTokenId": 1,
|
||||||
|
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||||
|
"amount": 34,
|
||||||
|
"ovpasNumber": "OV34567",
|
||||||
|
"verifcationCode": "A7H6",
|
||||||
|
"startDate": "2024-03-22T09:00:00z",
|
||||||
|
"endDate": "string",
|
||||||
|
"isRenewable": true,
|
||||||
|
"nextDebitDate": "string",
|
||||||
|
"termAmountExclTax": 0,
|
||||||
|
"termAmountInclTax": 0,
|
||||||
|
},
|
||||||
|
"tapconnectProduct":
|
||||||
|
{
|
||||||
|
"ticketLanguage": "NL",
|
||||||
|
"validityStart": "2020-03-03",
|
||||||
|
"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": "#/0/startDate",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"detail": "Combination of product and token type is not valid.",
|
||||||
|
"pointer": "#/1/ovPayTokenId",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
/orders/{orderId}/fulfillment:
|
/orders/{orderId}/fulfillment:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Order Fulfillment
|
- Order Fulfillment v2
|
||||||
summary: Order fulfillment
|
summary: Order fulfillment
|
||||||
description: Order fulfillment.
|
description: Order fulfillment.
|
||||||
parameters:
|
parameters:
|
||||||
@ -75,42 +236,50 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/postOrderFulfillment'
|
$ref: "#/components/schemas/postOrderFulfillment"
|
||||||
examples:
|
example:
|
||||||
postOrderFulfillment:
|
{
|
||||||
value:
|
"customerProfileID": 123415,
|
||||||
customerProfileID: 123415
|
"customerProfileData": { "dateOfBirth": "09-03-1989" },
|
||||||
customerProfileData:
|
"personalAccountData": { "birthdate": "09-03-1989" },
|
||||||
dateOfBirth: 09-03-1989
|
"directDebitMandate":
|
||||||
personalAccountData:
|
{
|
||||||
birthdate: 09-03-1989
|
"consumerName": "J. de Tèster",
|
||||||
directDebitMandate:
|
"consumerBic": "RABONL2U",
|
||||||
consumerName: J. de Tèster
|
"consumerIban": "NL44RABO0123456789",
|
||||||
consumerBic: RABONL2U
|
},
|
||||||
consumerIban: NL44RABO0123456789
|
"orderContents":
|
||||||
orderContents:
|
[
|
||||||
- ovPayTokenId: 123
|
{
|
||||||
serviceReferenceId: NLOV1234567ABCDEFG
|
"ovPayTokenId": 123,
|
||||||
amount: 450
|
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||||
ovpasNumber: 63AW974
|
"amount": 450,
|
||||||
productId: 2
|
"ovpasNumber": "63AW974",
|
||||||
startDate: '2024-03-22T09:00:00Z'
|
"productId": 2,
|
||||||
quantity: 1
|
"startDate": "2024-03-22T09:00:00Z",
|
||||||
orderlineId: 2d7fadc9-b64b-4516-9a7d-cf550f201372
|
"quantity": 1,
|
||||||
- ovPayTokenId: 123
|
"orderlineId": "2d7fadc9-b64b-4516-9a7d-cf550f201372",
|
||||||
serviceReferenceId: NLOV1234567ABCDEFG
|
},
|
||||||
amount: 450
|
{
|
||||||
ovpasNumber: 63AW974
|
"ovPayTokenId": 123,
|
||||||
productId: 3
|
"serviceReferenceId": "NLOV1234567ABCDEFG",
|
||||||
startDate: '2024-03-16T09:00:00Z'
|
"amount": 450,
|
||||||
quantity: 1
|
"ovpasNumber": "63AW974",
|
||||||
orderlineId: 9d7fadc9-b64b-4516-9a7d-cf550f201378
|
"productId": 3,
|
||||||
orderStatus: succeededPayment
|
"startDate": "2024-03-16T09:00:00Z",
|
||||||
|
"quantity": 1,
|
||||||
|
"orderlineId": "9d7fadc9-b64b-4516-9a7d-cf550f201378",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"orderStatus": "succeededPayment",
|
||||||
|
}
|
||||||
responses:
|
responses:
|
||||||
'200':
|
"200":
|
||||||
description: Successful
|
description: Successful
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
unavailable:
|
||||||
|
type: object
|
||||||
postOrderFulfillment:
|
postOrderFulfillment:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user