From aac4254e2e1212dfb4196c02c538c187550369f0 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 24 Oct 2024 17:48:56 +0200 Subject: [PATCH 1/4] OVPAY-1126 - Added deletes on order and order line. --- src/openapi/orders/orders-crud.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 223eb5b..91b8880 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -672,6 +672,14 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: { "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d" } + delete: + summary: RFU. Delete an order. + description: Delete an order. + tags: + - Order + responses: + "200": + description: OK /orders/{orderId}/statuses: parameters: - in: path @@ -1161,6 +1169,14 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: { "orderLineId": "ee82686a-a9f6-4888-b336-8e2aab6f4e13" } + delete: + summary: RFU. Delete an order line. + description: Delete an order line. + tags: + - Order Line + responses: + "200": + description: OK /orderlines/{orderLineId}/accountingstatuses: parameters: - in: path From 197f1e07f6459678d69783fab5e3ca2812f92ff7 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 25 Oct 2024 09:57:04 +0200 Subject: [PATCH 2/4] OVPAY-1126 - Payments should always be added in single. --- src/openapi/orders/orders-crud.yaml | 56 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 91b8880..8c60b61 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -803,8 +803,8 @@ paths: required: true description: The id of the order to process. post: - summary: P2. Add one or more payments to an order. - description: Add one or more payments to an order. + summary: P2. Add a payment to an order. + description: Add a payment to an order. tags: - Payment requestBody: @@ -813,36 +813,34 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: - [ - { - "createdOn": "2024-03-22T09:00:00", - "amountDebit": 121, - "paymentMethodId": 1, - "touchPointId": 1, - "isRefund": false, - "htmPaymentReference": "HTM-1234", - "pspPaymentReference": "Buckaroo-1234", - "paymentStatuses": - [ - { - "createdOn": "2024-03-22T09:00:00", - "statusCode": "190", - "statusDescription": "Success", - "statusSubCode": "S001", - "statusSubDescription": "PaymentSuccessFul", - }, - ], - "mandateInput": + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ { - "directDebitMandateTypeId": 1, "createdOn": "2024-03-22T09:00:00", - "bic": "RABONL2U", - "iban": "NL44RABO0123456789", - "ascription": "J. de Vries", - "place": "Den Haag", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", }, - }, - ] + ], + "mandateInput": + { + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + } responses: "201": description: Created From 2b531581174b3906e15ab8c1388870a3ee2d1f3c Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 25 Oct 2024 11:24:36 +0200 Subject: [PATCH 3/4] OVPAY-1126 - Specified endpoints for Order Creation and Order Retrieval for touch point. --- src/openapi/orders/service_engine_orders.yaml | 919 ++++++++++++++++-- 1 file changed, 837 insertions(+), 82 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 70d34d4..36ed1e7 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -13,8 +13,8 @@ paths: summary: Validate order. description: Validate order. parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header + - in: header + name: X-HTM-JWT-AUTH-HEADER required: true style: simple explode: false @@ -217,20 +217,21 @@ paths: summary: Fulfill an order. description: Fulfill an order. parameters: - - name: X-HTM-JWT-AUTH-HEADER - in: header + - in: header + name: X-HTM-JWT-AUTH-HEADER required: true style: simple explode: false schema: type: string - - name: orderId - in: path + - in: path + name: orderId required: true style: simple explode: false schema: type: string + format: uuid example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: @@ -354,7 +355,216 @@ paths: "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "orderNumber": "123456", } - /orders/: + /customers/{customerProfileId}/orders: + parameters: + - in: path + name: customerProfileId + required: true + style: simple + explode: false + schema: + type: integer + example: 42 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + get: + tags: + - Order Retrieval v2 (RFU) + summary: Get all orders for a specific customer. + description: Get all orders for a specific customer. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", + "orderNumber": "123456", + "customerProfileId": 42, + "totalAmount": 121, + "touchPointId": 1, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatus": + [ + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": { "orderStatusId": 4, "name": "paid" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order succesvol betaald", + }, + { + "order_orderStatusId": "2b9b7943-3a74-4f2e-ad65-012b62c80821", + "orderStatus": + { "orderStatusId": 3, "name": "pendingPayment" }, + "createdOn": "2024-03-22T08:55:00", + "description": "Betaling in behandeling", + }, + ], + "orderLines": + [ + { + "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", + "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadata": + { + "taxMetadataId": "06270769-a263-4325-82d6-f49396f39d03", + "taxCode": "V21", + "taxPercentageAmount": 21, + "description": "21% BTW", + }, + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "fe354db7-12ad-4fc1-bc63-a704c4e0d91e", + "termsUrl": "generalTermsAndConditions.pdf", + }, + ], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatus": + { "orderLineStatusId": 4, "name": "delivered" }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": + { "tokenTypeId": 1, "name": "EMV" }, + + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeType": + { "challengeTypeId": 1, "name": "email" }, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "orderAccountingStatusId": "7c5118d0-8535-4464-9239-83a7ba8fd2db", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + }, + ], + "payments": + [ + { + "paymentId": "3ba4a3c7-0803-4214-800b-365851b8903d", + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethod": + { + "paymentMethodId": 1, + "name": "ideal", + "provider": "Buckaroo", + }, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "paymentStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "mandateInputId": "0a875e67-dc9f-4825-a030-d732a2adbfbc", + "directDebitMandateType": + { + "directDebitMandateTypeId": 1, + "name": "import", + }, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": + { + "orderCustomerId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + }, + ] + /orders: + parameters: + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). post: tags: - Order Creation v2 (RFU) @@ -365,49 +575,342 @@ paths: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "externalOrderId": null, + "customerProfileId": 1337, + "totalAmount": 121, + "touchPointId": 1, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "order_OrderStatus": + [ + { + "orderStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Concept order", + }, + ], + "orderLines": + [ + { + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadataId": "7275b910-37d9-40c1-aaac-80d8ceb62ff9", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [{ "termsUrl": "generalTermsAndConditions.pdf" }], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + }, + ], + "payments": + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + } responses: "201": description: Created - /orders/{uuid}: - patch: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "orderId": "1e441d7d-50d6-4006-aca7-5e87e2f218df", + "orderNumber": "ORD-123456", + } + /orders/{orderId}: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + get: tags: - - Order Creation v2 (RFU) - summary: Update an existing orderline. - description: Update an existing orderline. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - example: null + - Order Retrieval v2 (RFU) + summary: Get a single order. + description: Get a single order. responses: "200": description: OK - /orderlines/{uuid}: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "orderId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "externalOrderId": "bac3958b-804a-43e3-b5f7-0b0fffaae5b7", + "orderNumber": "123456", + "customerProfileId": 42, + "totalAmount": 121, + "touchPointId": 1, + "language": + { + "languageId": 1, + "name": "Nederlands", + "iso639Code": "nl-NL", + "ietfCode": "nl", + }, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "order_OrderStatus": + [ + { + "order_orderStatusId": "f1d0e1a7-a3cf-4876-b8f2-073add10667f", + "orderStatus": { "orderStatusId": 4, "name": "paid" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Order succesvol betaald", + }, + { + "order_orderStatusId": "2b9b7943-3a74-4f2e-ad65-012b62c80821", + "orderStatus": + { "orderStatusId": 3, "name": "pendingPayment" }, + "createdOn": "2024-03-22T08:55:00", + "description": "Betaling in behandeling", + }, + ], + "orderLines": + [ + { + "orderLineId": "7a7a9d1a-3fc8-4058-a28b-082860aaa311", + "externalOrderLineId": "f5fddff0-7fbd-4285-bccb-e584f431ea69", + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadata": + { + "taxMetadataId": "06270769-a263-4325-82d6-f49396f39d03", + "taxCode": "V21", + "taxPercentageAmount": 21, + "description": "21% BTW", + }, + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [ + { + "orderLineTermsId": "fe354db7-12ad-4fc1-bc63-a704c4e0d91e", + "termsUrl": "generalTermsAndConditions.pdf", + }, + ], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatus": + { "orderLineStatusId": 4, "name": "delivered" }, + "createdOn": "2024-03-22T09:00:00", + "lastUpdatedOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "customerTokenId": "878ad7c1-cd8f-4bcf-a983-1bd8c6e6975e", + "tokenType": { "tokenTypeId": 1, "name": "EMV" }, + + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "personalAccountDataId": "47db8a40-3238-4bf5-9284-759e3888bd47", + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeType": + { "challengeTypeId": 1, "name": "email" }, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "orderAccountingStatusId": "7c5118d0-8535-4464-9239-83a7ba8fd2db", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + }, + ], + "payments": + [ + { + "paymentId": "3ba4a3c7-0803-4214-800b-365851b8903d", + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethod": + { + "paymentMethodId": 1, + "name": "ideal", + "provider": "Buckaroo", + }, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "paymentStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "mandateInputId": "0a875e67-dc9f-4825-a030-d732a2adbfbc", + "directDebitMandateType": + { + "directDebitMandateTypeId": 1, + "name": "import", + }, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + }, + ], + "orderCustomer": + { + "orderCustomerId": "19ef6882-8eda-43bf-b48e-9b4ff8745a50", + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "orderCustomerAddressId": "aa50047c-58ac-4f15-9448-ee000dfc6893", + "addressType": + { "addressTypeId": 1, "name": "Billing" }, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + }, + } patch: tags: - Order Creation v2 (RFU) summary: Update an existing order. description: Update an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: @@ -417,102 +920,354 @@ paths: responses: "200": description: OK - /orders/{uuid}/payments: + delete: + tags: + - Order Creation v2 (RFU) + summary: Delete an existing order. + description: Delete an existing order. + responses: + "200": + description: OK + /orders/{orderId}/orderlines: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + post: + tags: + - Order Creation v2 (RFU) + summary: Add a new order line to an existing order. + description: Add a new order line to an existing order. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "externalOrderLineId": null, + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxMetadataId": "1d6f1725-1072-4f08-982c-3df51dd854a1", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "orderLineTerms": + [{ "termsUrl": "generalTermsAndConditions.pdf" }], + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "customerTokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + "orderAccountingStatuses": + [ + { + "accountingStatusId": 1, + "createdOn": "2024-03-22T09:00:00", + "description": "Financiele transactie voor de FIKO.", + }, + ], + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } + /orderlines/{orderLineId}: + parameters: + - in: path + name: orderLineId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HTM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). + patch: + tags: + - Order Creation v2 (RFU) + summary: Update an existing order line. + description: Update an existing order line. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "taxAmount": 21, + "taxMetadataId": "0574440e-7fa0-401f-b907-539c91633a5d", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "validFrom": "2024-03-22T09:00:00", + "validUntil": "2025-03-22T09:00:00", + "orderLineStatusId": 4, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "orderLineId": "e78b78d9-4fb0-4a9c-8dc0-6d100c9f1b3f" } + delete: + tags: + - Order Creation v2 (RFU) + summary: Delete an existing order line. + description: Delete an existing order line. + responses: + "200": + description: OK + /orders/{orderId}/payments: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). post: tags: - Order Creation v2 (RFU) summary: Add a payment to an existing order. description: Add a payment to an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "mandateInput": + { + "directDebitMandateTypeId": 1, + "createdOn": "2024-03-22T09:00:00", + "bic": "RABONL2U", + "iban": "NL44RABO0123456789", + "ascription": "J. de Vries", + "place": "Den Haag", + }, + } responses: "201": description: Created - /payments/{uuid}: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /payments/{paymentId}: + parameters: + - in: path + name: paymentId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). patch: tags: - Order Creation v2 (RFU) summary: Update a payment on an existing order. description: Update a payment on an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + } responses: "200": description: OK - /orders/{uuid}/customers: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "paymentId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /orders/{orderId}/ordercustomers: + parameters: + - in: path + name: orderId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). post: tags: - Order Creation v2 (RFU) summary: Add a customer to an existing order. description: Add a customer to an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + "orderCustomerAddresses": + [ + { + "addressTypeId": 1, + "street": "Kon. Julianaplein", + "houseNumber": 10, + "houseNumberSuffix": "a", + "postalCode": "2595 AA", + "city": "Den Haag", + "country": "NL", + }, + ], + } responses: "201": description: Created - /customers/{uuid}: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } + /ordercustomers/{orderCustomerId}: patch: + parameters: + - in: path + name: orderCustomerId + required: true + style: simple + explode: false + schema: + type: string + format: uuid + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 + - in: header + name: X-HM-JWT-AUTH-HEADER + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + description: The JWT of the logged in customer (in case of a web shop). tags: - Order Creation v2 (RFU) summary: Update a customer on an existing order. description: Update a customer on an existing order. - parameters: - - name: uuid - in: path - required: true - style: simple - explode: false - schema: - type: string - example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: schema: $ref: "#/components/schemas/unavailable" - example: null + example: + { + "birthname": "Jan", + "surname": "Vries", + "prefix": "de", + "emailAddress": "jandevries@outlook.com", + "dateOfBirth": "1970-01-01", + } responses: "200": description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "orderCustomerId": "94270188-4cf6-447e-bd49-e8186bcec073" } components: securitySchemes: bearerToken: From 836a884cfd19a430e537c6c81e1dde50daa4654d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 4 Nov 2024 15:55:50 +0100 Subject: [PATCH 4/4] OVPAY-1172 - Return current state of order object in fulfillment v2. --- src/openapi/orders/service_engine_orders.yaml | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 36ed1e7..3c144ca 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -354,6 +354,107 @@ paths: { "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "orderNumber": "123456", + "customerProfileId": 1337, + "totalAmount": 121, + "languageId": 1, + "billingAddressId": 1, + "shippingAddressId": 1, + "createdOn": "2024-03-22T09:00:00", + "orderStatusId": 4, + "orderLines": + [ + { + "orderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", + "productId": 1, + "productName": "HTM Maandkorting 20%", + "productCode": "HTM-MND-20", + "productDescription": "HTM Maandkorting 20%", + "taxAmount": 21, + "taxCode": "V21", + "amountExclTax": 100, + "amountInclTax": 121, + "quantity": 1, + "terms": + [ + "generalTermsAndConditions.pdf", + "productTermsAndConditions.pdf", + ], + "createdOn": "2024-03-22T09:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "orderLineStatusId": 4, + "tokens": + [ + { + "tokenTypeId": 1, + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verificationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], + }, + ], + "payments": + [ + { + "createdOn": "2024-03-22T09:00:00", + "amountDebit": 121, + "paymentMethodId": 1, + "touchPointId": 1, + "isRefund": false, + "htmPaymentReference": "HTM-1234", + "pspPaymentReference": "Buckaroo-1234", + "paymentStatuses": + [ + { + "createdOn": "2024-03-22T09:00:00", + "statusCode": "190", + "statusDescription": "Success", + "statusSubCode": "S001", + "statusSubDescription": "PaymentSuccessFul", + }, + ], + "payPush": + { + "consumerIssuer": "ABN AMRO", + "transactionId": "0000000000000001", + "consumerName": "J. de Vries", + "consumerIBAN": "NL44RABO0123456789", + "consumerBIC": "RABONL2U", + }, + }, + ], + "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", + }, + ], + }, } /customers/{customerProfileId}/orders: parameters: