diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index a0a89d8..a076bce 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -9,7 +9,7 @@ paths: /orders/validation: post: tags: - - Order Validation + - Order Validation v2 summary: Validate order. description: Validate order. parameters: @@ -24,35 +24,196 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/postOrderValidation' - examples: - postOrderValidation: - value: - - ovPayTokenId: 2 - serviceReferenceId: NLOV1234567ABCDEFG - amount: 34 - ovpasNumber: OV34567 - productId: 2 - startDate: 2024-03-22T09:00:00z - quantity: 1 - - ovPayTokenId: 3 - serviceReferenceId: NLOV1234567ABCDEFG - amount: 89 - ovpasNumber: OV34567 - productId: 4 - startDate: 2024-03-22T09:00:00z - quantity: 4 + $ref: "#/components/schemas/unavailable" + example: + { + "purchaseDate": "2024-03-01", + "touchPointId": 1, + "customerProfileId": 1, + "contents": + [ + { + "productId": 1, + "quantity": 5, + "personalization": + { + "gboProduct": + { + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "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: - '200': + "200": description: Successful content: application/json: 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: post: tags: - - Order Fulfillment + - Order Fulfillment v2 summary: Order fulfillment description: Order fulfillment. parameters: @@ -75,42 +236,50 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/postOrderFulfillment' - examples: - postOrderFulfillment: - value: - customerProfileID: 123415 - customerProfileData: - dateOfBirth: 09-03-1989 - personalAccountData: - birthdate: 09-03-1989 - directDebitMandate: - consumerName: J. de Tèster - consumerBic: RABONL2U - consumerIban: NL44RABO0123456789 - orderContents: - - ovPayTokenId: 123 - serviceReferenceId: NLOV1234567ABCDEFG - amount: 450 - ovpasNumber: 63AW974 - productId: 2 - startDate: '2024-03-22T09:00:00Z' - quantity: 1 - orderlineId: 2d7fadc9-b64b-4516-9a7d-cf550f201372 - - ovPayTokenId: 123 - serviceReferenceId: NLOV1234567ABCDEFG - amount: 450 - ovpasNumber: 63AW974 - productId: 3 - startDate: '2024-03-16T09:00:00Z' - quantity: 1 - orderlineId: 9d7fadc9-b64b-4516-9a7d-cf550f201378 - orderStatus: succeededPayment + $ref: "#/components/schemas/postOrderFulfillment" + example: + { + "customerProfileID": 123415, + "customerProfileData": { "dateOfBirth": "09-03-1989" }, + "personalAccountData": { "birthdate": "09-03-1989" }, + "directDebitMandate": + { + "consumerName": "J. de Tèster", + "consumerBic": "RABONL2U", + "consumerIban": "NL44RABO0123456789", + }, + "orderContents": + [ + { + "ovPayTokenId": 123, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 450, + "ovpasNumber": "63AW974", + "productId": 2, + "startDate": "2024-03-22T09:00:00Z", + "quantity": 1, + "orderlineId": "2d7fadc9-b64b-4516-9a7d-cf550f201372", + }, + { + "ovPayTokenId": 123, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 450, + "ovpasNumber": "63AW974", + "productId": 3, + "startDate": "2024-03-16T09:00:00Z", + "quantity": 1, + "orderlineId": "9d7fadc9-b64b-4516-9a7d-cf550f201378", + }, + ], + "orderStatus": "succeededPayment", + } responses: - '200': + "200": description: Successful components: schemas: + unavailable: + type: object postOrderFulfillment: type: object properties: @@ -238,4 +407,4 @@ components: detail: type: string pointer: - type: string \ No newline at end of file + type: string