From 1467a456637b76b9b9e9af5ce76b1d2ee29a91fa Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 20 Sep 2024 14:18:27 +0200 Subject: [PATCH] Oder Fullfillment v2. --- src/openapi/orders/service_engine_orders.yaml | 251 ++++++++---------- 1 file changed, 109 insertions(+), 142 deletions(-) diff --git a/src/openapi/orders/service_engine_orders.yaml b/src/openapi/orders/service_engine_orders.yaml index 79b4241..456bbb4 100644 --- a/src/openapi/orders/service_engine_orders.yaml +++ b/src/openapi/orders/service_engine_orders.yaml @@ -80,7 +80,7 @@ paths: } responses: "200": - description: Successful + description: Success content: application/json: schema: @@ -210,12 +210,12 @@ paths: }, ], } - /orders: + /orders/{orderId}/fulfillment: post: tags: - - Order Create v2 - summary: Create an order. - description: Create an order. + - Order Fulfillment v2 + summary: Fulfill an order. + description: Fulfill an order. parameters: - name: X-HTM-JWT-AUTH-HEADER in: header @@ -224,6 +224,14 @@ paths: explode: false schema: type: string + - name: orderId + in: path + required: true + style: simple + explode: false + schema: + type: string + example: a0ef57fa-395c-4a03-96e9-234c26dccea9 requestBody: content: application/json: @@ -231,36 +239,53 @@ paths: $ref: "#/components/schemas/unavailable" example: { - "externalOrderId": "371940c1-4b58-40dd-aa59-608503a35efb", - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", + "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9", "orderNumber": "123456", "customerProfileId": 1337, "totalAmount": 121, "touchPointId": 1, + "languageId": 1, "billingAddressId": 1, "shippingAddressId": 1, - "languageId": 1, - "orderStatus": 4, + "createdOn": "2024-03-22T09:00:00", + "orderStatusId": 4, "orderLines": [ { - "externalOrderLineid": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", - "createdOn": "2024-03-22T09:00:00", - "lastUpdatedOn": "2024-03-22T09:00:00", + "orderLineId": "2ba39cae-c401-446b-ae5c-2d6d85b3df1f", "productId": 1, "productName": "HTM Maandkorting 20%", "productCode": "HTM-MND-20", "productDescription": "HTM Maandkorting 20%", - "amountExclTax": 100, "taxAmount": 21, "taxCodeId": "V21", + "amountExclTax": 100, "amountInclTax": 121, "quantity": 1, "terms": "generalTermsAndConditions.pdf", + "createdOn": "2024-03-22T09:00:00", "validFrom": "2024-03-22T09:00:00", "validUntil": null, "orderLineStatusId": 4, + "tokens": + [ + { + "ovPayTokenId": 1, + "serviceReferenceId": "NLOV1234567ABCDEFG", + "amount": 34, + "ovpasNumber": "OV34567", + "verifcationCode": "A7H6", + "personalAccountData": + { + "name": "Jan de Vries", + "dateOfBirth": "01-01-1970", + "photoReference": "DSC_0502.JPG", + "fileType": "image/jpg", + "challengeTypeId": 1, + "oneTimePassword": "H5Iiz3JTaQeIV8p", + }, + }, + ], }, ], "payments": @@ -269,6 +294,7 @@ paths: "createdOn": "2024-03-22T09:00:00", "amountDebit": 121, "paymentMethodId": 1, + "touchPointId": 1, "isRefund": false, "htmPaymentReference": "HTM-1234", "pspPaymentReference": "Buckaroo-1234", @@ -282,6 +308,14 @@ paths: "statusSubDescription": "PaymentSuccessFul", }, ], + "payPush": + { + "consumerIssuer": "ABN AMRO", + "transactionId": "0000000000000001", + "consumerName": "J. de Vries", + "consumerIBAN": "NL44RABO0123456789", + "consumerBIC": "RABONL2U", + }, }, ], "customer": @@ -308,135 +342,68 @@ paths: responses: "200": description: Successful + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "orderId": "a0ef57fa-395c-4a03-96e9-234c26dccea9" } + /orders/: + post: + tags: + - Order Creation v2 (RFU) + summary: Create a new order. + responses: + "201": + description: Created + /orders/{uuid}: + patch: + tags: + - Order Creation v2 (RFU) + summary: Update an existing orderline. + responses: + "200": + description: Success + /orderlines/{uuid}: + patch: + tags: + - Order Creation v2 (RFU) + summary: Update an existing order. + responses: + "200": + description: Success + /orders/{uuid}/payments: + post: + tags: + - Order Creation v2 (RFU) + summary: Add a payment to an existing order. + responses: + "201": + description: Created + /payments/{uuid}: + patch: + tags: + - Order Creation v2 (RFU) + summary: Update a payment on an existing order. + responses: + "200": + description: Success + /orders/{uuid}/customers: + post: + tags: + - Order Creation v2 (RFU) + summary: Add a customer to an existing order. + responses: + "200": + description: Success + /customers/{uuid}: + patch: + tags: + - Order Creation v2 (RFU) + summary: Update a customer on an existing order. + responses: + "200": + description: Success components: schemas: unavailable: type: object - postOrderFulfillment: - type: object - properties: - customerProfileID: - type: number - customerProfileData: - type: object - properties: - dateOfBirth: - type: string - personalAccountData: - type: object - properties: - birthdate: - type: string - directDebitMandate: - type: object - properties: - consumerName: - type: string - consumerBic: - type: string - consumerIban: - type: string - orderContents: - type: array - items: - type: object - properties: - ovPayTokenId: - type: number - serviceReferenceId: - type: string - amount: - type: number - ovpasNumber: - type: string - productId: - type: number - startDate: - type: string - quantity: - type: number - orderlineId: - type: string - format: uuid - orderStatus: - type: string - postOrderValidation: - type: array - items: - properties: - ovPayTokenId: - type: integer - serviceReferenceId: - type: string - amount: - type: integer - ovpasNumber: - type: string - productId: - type: integer - startDate: - type: string - quantity: - type: integer - postCustomerProfileOvPayTokenResponse: - type: object - properties: - validContents: - type: boolean - amountExclTax: - type: number - taxPercentage: - type: number - amountInclTax: - type: number - contents: - type: array - items: - type: object - properties: - ovPayTokenId: - type: number - serviceReferenceId: - type: string - ovpasNumber: - type: string - productId: - type: number - quantity: - type: number - amountExclTax: - type: number - taxPercentage: - type: number - amountInclTax: - type: number - startDate: - type: string - endDate: - type: string - isRenewable: - type: boolean - nextDebitDate: - type: string - termAmountExclTax: - type: number - termAmountInclTax: - type: number - additionalRemarks: - type: array - items: - type: object - properties: - code: - type: string - parameter: - type: string - validationErrors: - type: array - items: - type: object - properties: - detail: - type: string - pointer: - type: string