From 9f6d5c3096696f5681a925d7a774595d426de3e0 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 21 Oct 2024 16:13:03 +0200 Subject: [PATCH 01/11] DHIL-2644 - Added sourceMetadata. --- src/openapi/fiko/fiko-crud.yaml | 99 +++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 74a019d..a5df59a 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -762,6 +762,105 @@ paths: $ref: "#/components/schemas/unavailable" example: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /sourceMetadata: + get: + summary: Get source metadata. + description: Get source metadata. + tags: + - Metadata v2 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + ] + post: + summary: Add source metadata. + description: Add source metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /sourceMetadata/{sourceMetadataId}: + parameters: + - in: path + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the source metadata. + patch: + summary: Update source metadata. + description: Update source metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } components: securitySchemes: bearerToken: From 088420d8db3d3590148f9f7ab001aa092366adf2 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 21 Oct 2024 16:43:29 +0200 Subject: [PATCH 02/11] DHIL-3364 - order_OrderStatus is one-to-many. --- src/openapi/orders/orders-crud.yaml | 66 ++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 69ecd1c..223eb5b 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -110,7 +110,7 @@ paths: type: integer explode: false required: false - description: Filter on possible order statuses. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled. + description: Filter on most recent order status. 1 = concept, 2 = awaitingPayment, 3 = pendingPayment, 4 = paid, 5 = delivered, 6 = cancelled. responses: "200": description: OK @@ -141,13 +141,25 @@ paths: "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": "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": [ { @@ -315,11 +327,18 @@ paths: "shippingAddressId": 1, "createdOn": "2024-03-22T09:00:00", "order_OrderStatus": - { - "orderStatusId": 4, - "createdOn": "2024-03-22T09:00:00", - "description": "Order succesvol betaald", - }, + [ + { + "orderStatusId": 4, + "createdOn": "2024-03-22T09:00:00", + "description": "Order succesvol betaald", + }, + { + "orderStatusId": 3, + "createdOn": "2024-03-22T08:55:00", + "description": "Betaling in behandeling", + }, + ], "orderLines": [ { @@ -475,12 +494,21 @@ paths: "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": "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": [ { From 3dc7cc97650afca631bceed2796d426ba71e8fd8 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 22 Oct 2024 10:45:21 +0200 Subject: [PATCH 03/11] DHIL-2644 - Added more metadata. --- src/openapi/fiko/fiko-crud.yaml | 302 ++++++++++++++++++++++++++++++-- 1 file changed, 284 insertions(+), 18 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index a5df59a..59068c9 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -221,7 +221,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1" } - /transactionItems/{transactionItemId}/processingfailures: + /transactionitems/{transactionItemId}/processingfailures: parameters: - in: path name: transactionItemId @@ -278,7 +278,7 @@ paths: { "processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", } - /transactionItems/{transactionItemId}/transactionAuditTrail: + /transactionitems/{transactionItemId}/transactionaudittrail: parameters: - in: path name: transactionItemId @@ -474,7 +474,7 @@ paths: ], }, ] - /productMetadata: + /productmetadata: post: summary: Add product metadata. description: Add product metadata. @@ -507,7 +507,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } - /contraAccountMetadata: + /contraaccountmetadata: get: summary: Get contra account metadata. description: Get contra account metadata. @@ -533,14 +533,7 @@ paths: type: string format: date-time example: 2024-03-22T09:00:00 - description: The valid from date of the metadata. - - in: query - name: validUntil - schema: - type: string - format: date-time - example: 2024-03-22T09:00:00 - description: The valid until date of the metadata. + description: Timestamp that the metadata is valid. responses: "200": description: OK @@ -585,7 +578,7 @@ paths: { "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } - /contraAccountMetadata/{contraAccountMetadataId}: + /contraaccountmetadata/{contraAccountMetadataId}: parameters: - in: path name: contraAccountMetadataId @@ -623,7 +616,7 @@ paths: { "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } - /taxMetadata: + /taxmetadata: get: summary: Get tax metadata. description: Get tax metadata. @@ -661,7 +654,7 @@ paths: type: string format: date-time example: 2024-03-22T09:00:00 - description: Date that the tax metadata is valid. + description: Timestamp that the metadata is valid. responses: "200": description: OK @@ -724,7 +717,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } - /taxMetadata/{taxMetadataId}: + /taxmetadata/{taxMetadataId}: parameters: - in: path name: taxMetadataId @@ -762,12 +755,63 @@ paths: $ref: "#/components/schemas/unavailable" example: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } - /sourceMetadata: + /sourcemetadata: get: summary: Get source metadata. description: Get source metadata. tags: - Metadata v2 + parameters: + - in: query + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the source metadata. + - in: query + name: incomingName + schema: + type: string + example: VerkoopEngine + description: The name of the source. + - in: query + name: incomingEntity + schema: + type: string + example: OrderLine + description: The entity of the source. + - in: query + name: outgoingName + schema: + type: string + example: Website Verkopen + description: The name of the destination. + - in: query + name: businessOwner + schema: + type: string + example: Corneel Verstoep + description: The business owner of the source. + - in: query + name: rejectionProcessing + schema: + type: string + example: system + description: The rejection processing of the source. + - in: query + name: rejectionInfo + schema: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + description: The rejection info of the source. + - in: query + name: validAt + schema: + type: string + example: 2024-01-01T00:00:00.000 + description: Timestamp that the metadata is valid. responses: "200": description: OK @@ -820,7 +864,7 @@ paths: $ref: "#/components/schemas/unavailable" example: { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } - /sourceMetadata/{sourceMetadataId}: + /sourcemetadata/{sourceMetadataId}: parameters: - in: path name: sourceMetadataId @@ -861,6 +905,228 @@ paths: $ref: "#/components/schemas/unavailable" example: { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /accountingperiodmetadata: + get: + summary: Get accounting period metadata. + description: Get accounting period metadata. + tags: + - Metadata v2 + parameters: + - in: query + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the accounting period metadata. + - in: query + name: accountingPeriod + schema: + type: string + example: 2024-01 + description: The accounting period. + - in: query + name: isOpen + schema: + type: boolean + example: true + description: Whether the accounting period is open. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "accountingPeriod": "2024-01", + "isOpen": true, + }, + ] + post: + summary: Add accounting period metadata. + description: Add accounting period metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "accountingPeriod": "2024-01", "isOpen": true } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /accountingperiodmetadata/{accountingPeriodMetadataId}: + parameters: + - in: path + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the accounting period metadata. + patch: + summary: Update accounting period metadata. + description: Update accounting period metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "accountingPeriod": "2024-01", "isOpen": true } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /concessionmetadata: + get: + summary: Get concession metadata. + description: Get concession metadata. + tags: + - Metadata v2 + parameters: + - in: query + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the concession metadata. + - in: query + name: concessionId + schema: + type: integer + example: 1 + description: The id of the concession. + - in: query + name: percentage + schema: + type: number + example: 84.021 + description: The percentage of the concession. + - in: query + name: validAt + schema: + type: string + example: 2024-01-01T00:00:00.000 + description: Timestamp that the metadata is valid. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "concession": { "concessionId": 1, "name": "RAIL" }, + "percentage": 84.021, + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + { + "concessionMetadataId": "5ac3a5a8-4b9b-4a6a-9b1f-86ae8d6d4a9b", + "concession": { "concessionId": 2, "name": "BUS" }, + "percentage": 15.979, + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + ] + post: + summary: Add concession metadata. + description: Add concession metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionId": 2, + "percentage": 15.979, + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /concessionmetadata/{concessionMetadataId}: + parameters: + - in: path + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the concession metadata. + patch: + summary: Update concession metadata. + description: Update concession metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionId": 2, + "percentage": 15.979, + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } components: securitySchemes: bearerToken: From 2e1a28c58323e83ca95172097bd4bfc3bacaf39a Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 22 Oct 2024 11:47:41 +0200 Subject: [PATCH 04/11] DHIL-2644 - Added reference data and minor improvements. --- src/openapi/fiko/fiko-crud.yaml | 190 +++++++++++++++++++++++++------- 1 file changed, 151 insertions(+), 39 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 59068c9..1fdd3fe 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -278,7 +278,7 @@ paths: { "processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", } - /transactionitems/{transactionItemId}/transactionaudittrail: + /transactionitems/{transactionItemId}/transactionaudittrails: parameters: - in: path name: transactionItemId @@ -288,30 +288,6 @@ paths: example: 9834b346-d68c-438d-9bd5-6716422c2657 required: true description: The id of the transaction item to process. - get: - summary: Get all audit trail entries for a transaction. - description: Get all audit trail entries for a transaction. - tags: - - Audit Trail v2 - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - example: - [ - { - "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1", - "user": "fiko", - "timestamp": "2022-01-01 00:00:00", - "action": "created", - "description": "Transaction created.", - "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", - }, - ] post: summary: Add an audit trail entry. description: Add an audit trail entry. @@ -342,6 +318,86 @@ paths: { "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", } + /transactionaudittrails: + get: + summary: Find audit trail entries. + description: Find audit trail entries. + tags: + - Audit Trail v2 + parameters: + - in: query + name: transactionAuditTrailId + schema: + type: string + format: uuid + example: 498e11fd-86c7-4e26-8ca9-c5ed9049da9e + required: true + description: The id of the audit trail. + - in: query + name: transactionItemId + schema: + type: string + format: uuid + example: 9834b346-d68c-438d-9bd5-6716422c2657 + required: true + description: The id of the transaction item. + - in: query + name: user + schema: + type: string + example: fiko + description: The user who created the audit trail. + - in: query + name: timestampBefore + schema: + type: string + example: 2022-01-01 00:00:00 + description: The timestamp before the event occured. + - in: query + name: timestampAfter + schema: + type: string + example: 2022-01-01 00:00:00 + description: The timestamp after the event occured. + - in: query + name: action + schema: + type: array + items: + type: string + example: [created, succeeded, failed] + description: The action of the event. + - in: query + name: description + schema: + type: string + example: Transaction created. + description: The description of the event. + - in: query + name: correlationId + schema: + type: string + example: a3891560-3084-42cb-867c-f289e7cda47d + description: The correlation id of the event. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", + "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1", + "user": "fiko", + "timestamp": "2022-01-01 00:00:00", + "action": "created", + "description": "Transaction created.", + "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", + }, + ] /processingfailures: get: summary: Find processing failures. @@ -509,8 +565,8 @@ paths: { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } /contraaccountmetadata: get: - summary: Get contra account metadata. - description: Get contra account metadata. + summary: Find contra account metadata. + description: Find contra account metadata. tags: - Metadata v2 parameters: @@ -618,8 +674,8 @@ paths: } /taxmetadata: get: - summary: Get tax metadata. - description: Get tax metadata. + summary: Find tax metadata. + description: Find tax metadata. tags: - Metadata v2 parameters: @@ -757,8 +813,8 @@ paths: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } /sourcemetadata: get: - summary: Get source metadata. - description: Get source metadata. + summary: Find source metadata. + description: Find source metadata. tags: - Metadata v2 parameters: @@ -907,8 +963,8 @@ paths: { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } /accountingperiodmetadata: get: - summary: Get accounting period metadata. - description: Get accounting period metadata. + summary: Find accounting period metadata. + description: Find accounting period metadata. tags: - Metadata v2 parameters: @@ -1004,8 +1060,8 @@ paths: } /concessionmetadata: get: - summary: Get concession metadata. - description: Get concession metadata. + summary: Find concession metadata. + description: Find concession metadata. tags: - Metadata v2 parameters: @@ -1020,8 +1076,10 @@ paths: - in: query name: concessionId schema: - type: integer - example: 1 + type: array + items: + type: integer + example: [1, 2] description: The id of the concession. - in: query name: percentage @@ -1046,14 +1104,14 @@ paths: [ { "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - "concession": { "concessionId": 1, "name": "RAIL" }, + "concession": { "concessionId": 1, "name": "rail" }, "percentage": 84.021, "validFrom": "2024-01-01T00:00:00.000", "validUntil": null, }, { "concessionMetadataId": "5ac3a5a8-4b9b-4a6a-9b1f-86ae8d6d4a9b", - "concession": { "concessionId": 2, "name": "BUS" }, + "concession": { "concessionId": 2, "name": "bus" }, "percentage": 15.979, "validFrom": "2024-01-01T00:00:00.000", "validUntil": null, @@ -1127,6 +1185,60 @@ paths: { "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } + /concessions: + get: + summary: Get all concessions. + description: Get all concessions. + tags: + - References v2 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "concessionId": 1, + "name": "rail", + }, + { + "concessionId": 2, + "name": "bus", + }, + { + "concessionId": 3, + "name": "not_applicable", + }, + ] + /failurereasons: + get: + summary: Get all failure reasons. + description: Get all failure reasons. + tags: + - References v2 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + [ + { + "failureReasonId": 1, + "reasonCode": "002", + "reasonDesc": "Contra account does not exist" + }, + { + "failureReasonId": 2, + "reasonCode": "003", + "reasonDesc": "Accouting period closed" + }, + ] components: securitySchemes: bearerToken: From c65c7dae2640b7ce32978b10b6012fde93193874 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 22 Oct 2024 14:01:01 +0200 Subject: [PATCH 05/11] DHIL-2644 - Added metadata audit trail operations. --- src/openapi/fiko/fiko-crud.yaml | 312 ++++++++++++++++++++++++++++++++ 1 file changed, 312 insertions(+) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 1fdd3fe..c5d0b73 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -563,6 +563,34 @@ paths: $ref: "#/components/schemas/unavailable" example: { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + /productmetadata/{productMetadataId}/metadataaudittrails: + parameters: + - in: path + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailRequest" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" /contraaccountmetadata: get: summary: Find contra account metadata. @@ -672,6 +700,34 @@ paths: { "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } + /contraaccountmetadata/{contraAccountMetadataId}/metadataaudittrails: + parameters: + - in: path + name: contraAccountMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailRequest" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" /taxmetadata: get: summary: Find tax metadata. @@ -811,6 +867,34 @@ paths: $ref: "#/components/schemas/unavailable" example: { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /taxmetadata/{taxMetadataId}/metadataaudittrails: + parameters: + - in: path + name: taxMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailRequest" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" /sourcemetadata: get: summary: Find source metadata. @@ -961,6 +1045,34 @@ paths: $ref: "#/components/schemas/unavailable" example: { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + /sourcemetadata/{sourceMetadataId}/metadataaudittrails: + parameters: + - in: path + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailRequest" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" /accountingperiodmetadata: get: summary: Find accounting period metadata. @@ -1058,6 +1170,34 @@ paths: { "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } + /accountingperiodmetadata/{accountingPeriodMetadataId}/metadataaudittrails: + parameters: + - in: path + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the contra account metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailRequest" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" /concessionmetadata: get: summary: Find concession metadata. @@ -1185,6 +1325,143 @@ paths: { "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", } + /concessionmetadata/{concessionMetadataId}/metadataaudittrails: + parameters: + - in: path + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product metadata. + post: + summary: Add metadata audit trail. + description: Add metadata audit trail. + tags: + - Audit Trail v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailRequest" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/postMetadataAuditTrailResponse" + /metadataaudittrails: + get: + summary: Find metadata audit trails. + description: Find metadata audit trails. + tags: + - Audit Trail v2 + parameters: + - in: query + name: metadataAuditTrailId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the metadata audit trail. + - in: query + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the product metadata. + - in: query + name: concessionMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the concession metadata. + - in: query + name: contraAccountMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the contra account metadata. + - in: query + name: taxMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the tax metadata. + - in: query + name: sourceMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the source metadata. + - in: query + name: accountingPeriodMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the accounting period metadata. + - in: query + name: user + schema: + type: string + example: rmeeuws + description: The username of the user. + - in: query + name: timestampBefore + schema: + type: string + example: 2022-01-01 00:00:00 + description: The timestamp before the event occured. + - in: query + name: timestampAfter + schema: + type: string + example: 2022-01-01 00:00:00 + description: The timestamp after the event occured. + - in: query + name: correlationId + schema: + type: string + example: a3891560-3084-42cb-867c-f289e7cda47d + description: The correlation id of the event. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "metadataAuditTrailId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "productMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + "concessionMetadataId": null, + "contraAccountMetadataId": null, + "taxMetadataId": null, + "sourceMetadataId": null, + "accountingPeriodMetadataId": null, + "user": "rmeeuws", + "timestamp": "2022-01-01 00:00:00", + "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", + "metadataChanges": [ + { + "metadataChangesId": "43a481a7-0845-460f-b44a-b4112cc2e193", + "fieldName": "businessOwner", + "oldValue": "Corneel Verstoep", + "newValue": "Jan-Willem Vermeij", + } + ] + } /concessions: get: summary: Get all concessions. @@ -1274,3 +1551,38 @@ components: example: - "/account/12345" - "/account/67890" + postMetadataAuditTrailRequest: + type: object + properties: + user: + type: string + example: rmeeuws + timestamp: + type: string + format: date-time + example: 2024-10-04T00:00:00 + correlationId: + type: string + format: uuid + example: a03cd0c2-38b5-4619-b9e3-d6e5b842e127 + metadataChanges: + type: array + items: + type: object + properties: + fieldName: + type: string + example: businessOwner + oldValue: + type: string + example: Corneel Verstoep + newValue: + type: string + example: Jan-Willem Vermeij + postMetadataAuditTrailResponse: + type: object + properties: + metadataAuditTrailId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf \ No newline at end of file From c6d31a01e33086d659037ef3d4a8e8e92d59733f Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 22 Oct 2024 15:22:19 +0200 Subject: [PATCH 06/11] DHIL-2644 - Implemented GET and POST ProductMetadata. --- src/openapi/fiko/fiko-crud.yaml | 207 ++++++++++++++++++++++++++++---- 1 file changed, 184 insertions(+), 23 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index c5d0b73..0b18233 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -531,6 +531,158 @@ paths: }, ] /productmetadata: + get: + summary: Get all product metadata. + description: Get all product metadata. + tags: + - Metadata v2 + parameters: + - in: query + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the product metadata. + - in: query + name: productCode + schema: + type: string + example: 4031 + description: The product code. + - in: query + name: department + schema: + type: string + example: 900 + description: The department. + - in: query + name: costCenter + schema: + type: string + example: 84955 + description: The cost center. + - in: query + name: costType + schema: + type: string + example: 619031 + description: The cost type. + - in: query + name: description + schema: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + description: The description. + - in: query + name: documentCode + schema: + type: string + example: VERK_FACTUUR + description: The document code. + - in: query + name: timestampUpdated + schema: + type: string + example: 2022-01-01 00:00:00 + description: The timestamp updated. + - in: query + name: validAt + schema: + type: string + example: 2024-03-22T09:00:00 + description: Timestamp that the metadata is valid. + - in: query + name: contraAccountMetadataId + schema: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + description: Find product metadata that is linked to this contra account. + - in: query + name: concessionId + schema: + type: integer + example: 1 + description: Find product metadata that is linked to this concession. + - in: query + name: sourceMetadataId + schema: + type: string + format: uuid + example: 08d96f94-f468-467e-9068-c86c34f43097 + description: Find product metadata that is linked to this source metadata. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", + "productCode": "4031", + "department": "900", + "costCenter": "84955", + "costType": "619031", + "description": "O4031_Reisproduct HTM 1 dag Anoniem", + "documentCode": "VERK_FACTUUR", + "timestampUpdated": "2022-01-01T00:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + "productContraAccounts": + [ + { + "contraAccountMetadata": + { + "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", + "contraAccount": "220.10419", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + "concession": { "concessionId": 2, "name": "bus" }, + "sourceMetadata": + { + "sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + { + "contraAccountMetadata": + { + "contraAccountMetadataId": "69c562ca-5299-4585-ac92-46fb54aeb99e", + "contraAccount": "220.10538", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + "concession": { "concessionId": 1, "name": "bus" }, + "sourceMetadata": + { + "sourceMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", + "incomingName": "VerkoopEngine", + "incomingEntity": "OrderLine", + "outgoingName": "Website Verkopen", + "businessOwner": "Corneel Verstoep", + "rejectionProcessing": "system", + "rejectionInfo": "api.htm.nl/v2/account/12345/msgs/abc", + "validFrom": "2024-01-01T00:00:00.000", + "validUntil": null, + }, + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + ], + } post: summary: Add product metadata. description: Add product metadata. @@ -553,6 +705,23 @@ paths: "timestampUpdated": "2022-01-01 00:00:00", "validFrom": "2024-03-22T09:00:00", "validUntil": null, + "productContraAccounts": + [ + { + "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", + "concessionId": 1, + "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + { + "contraAccountMetadataId": "02e458ce-f77a-4262-8b38-490e54f52856", + "concessionId": 2, + "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + }, + ], } responses: "201": @@ -1453,14 +1622,15 @@ paths: "user": "rmeeuws", "timestamp": "2022-01-01 00:00:00", "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", - "metadataChanges": [ - { - "metadataChangesId": "43a481a7-0845-460f-b44a-b4112cc2e193", - "fieldName": "businessOwner", - "oldValue": "Corneel Verstoep", - "newValue": "Jan-Willem Vermeij", - } - ] + "metadataChanges": + [ + { + "metadataChangesId": "43a481a7-0845-460f-b44a-b4112cc2e193", + "fieldName": "businessOwner", + "oldValue": "Corneel Verstoep", + "newValue": "Jan-Willem Vermeij", + }, + ], } /concessions: get: @@ -1477,18 +1647,9 @@ paths: $ref: "#/components/schemas/unavailable" example: [ - { - "concessionId": 1, - "name": "rail", - }, - { - "concessionId": 2, - "name": "bus", - }, - { - "concessionId": 3, - "name": "not_applicable", - }, + { "concessionId": 1, "name": "rail" }, + { "concessionId": 2, "name": "bus" }, + { "concessionId": 3, "name": "not_applicable" }, ] /failurereasons: get: @@ -1508,12 +1669,12 @@ paths: { "failureReasonId": 1, "reasonCode": "002", - "reasonDesc": "Contra account does not exist" + "reasonDesc": "Contra account does not exist", }, { "failureReasonId": 2, "reasonCode": "003", - "reasonDesc": "Accouting period closed" + "reasonDesc": "Accouting period closed", }, ] components: @@ -1585,4 +1746,4 @@ components: metadataAuditTrailId: type: string format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf \ No newline at end of file + example: 37a8095b-19db-498f-9349-5f37d21c5bdf From 96f8dea0d970399694f00d8201cef813d37b28f7 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 22 Oct 2024 15:40:45 +0200 Subject: [PATCH 07/11] DHIL-2644 - Implemented PATCH on product metadata and product contra account. --- src/openapi/fiko/fiko-crud.yaml | 80 +++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 0b18233..b555d46 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -732,6 +732,86 @@ paths: $ref: "#/components/schemas/unavailable" example: { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + /productmetadata/{productMetadataId}: + parameters: + - in: path + name: productMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product metadata. + patch: + summary: Update product metadata. + description: Update product metadata. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "productCode": "4031", + "department": "900", + "costCenter": "84955", + "costType": "619031", + "description": "O4031_Reisproduct HTM 1 dag Anoniem", + "documentCode": "VERK_FACTUUR", + "timestampUpdated": "2022-01-01 00:00:00", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + /productcontraaccounts/{productContraAccountId}: + parameters: + - in: path + name: productContraAccountId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the product contra account. + patch: + summary: Update product contra account. + description: Update product contra account. + tags: + - Metadata v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", + "concessionId": 1, + "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", + "validFrom": "2024-03-22T09:00:00", + "validUntil": null, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { "productContraAccountId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } /productmetadata/{productMetadataId}/metadataaudittrails: parameters: - in: path From 7bbbc85c4b1eede951f607a29896f8b482b356fa Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 24 Oct 2024 15:03:38 +0200 Subject: [PATCH 08/11] DHIL-3364 - externalOrderId is not a UUID but can be any string. --- src/openapi/orders/orders-crud.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openapi/orders/orders-crud.yaml b/src/openapi/orders/orders-crud.yaml index 223eb5b..e40232a 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -17,8 +17,7 @@ paths: name: externalOrderId schema: type: string - format: uuid - example: 26ce08bc-0443-465f-9cd2-a7143f33eed0 + example: EXT001 required: false description: The order id in the external system. - in: query From 4371149bb3335d3bd49cca2971346cddebd92d4e Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 25 Oct 2024 10:02:13 +0200 Subject: [PATCH 09/11] 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 e40232a..79f5c43 100644 --- a/src/openapi/orders/orders-crud.yaml +++ b/src/openapi/orders/orders-crud.yaml @@ -794,8 +794,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: @@ -804,36 +804,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 e8353b78da6d9ca525c836622db8dc34918f2cd1 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 25 Oct 2024 12:14:59 +0200 Subject: [PATCH 10/11] OVPAY-982 - Added isCredit to CRUD Contracts. --- src/openapi/contracts/contracts-crud.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index ac961e4..09e1de6 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -216,6 +216,7 @@ paths: "created": "2024-06-02 15:01:00.000", "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, { "contractInvoiceId": "1c345237-4d84-47f0-93c2-7b94338e3355", @@ -224,6 +225,7 @@ paths: "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, ], "contractVersions": @@ -273,6 +275,7 @@ paths: "created": "2024-06-02 15:01:00.000", "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, { "contractInvoiceId": "1c345237-4d84-47f0-93c2-7b94338e3355", @@ -281,6 +284,7 @@ paths: "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", + "isCredit": false, }, ], "contractVersions": @@ -401,6 +405,7 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, ], }, @@ -568,6 +573,7 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_sent", "data": "{json}", + "isCredit": false, }, { "contractInvoiceId": "dadff658-4ff5-4eb8-b516-492f1f6c6245", @@ -577,6 +583,7 @@ paths: "updated": "2024-08-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, ], } @@ -600,6 +607,7 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, } responses: @@ -684,6 +692,13 @@ paths: example: created required: false description: Invoice state. + - in: query + name: isCredit + schema: + type: boolean + example: false + required: false + description: Whether the invoice is a credit invoice. responses: "200": description: OK @@ -704,6 +719,7 @@ paths: "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, { "contractId": "a7452e22-3894-40cc-87d6-869370a92277", @@ -714,6 +730,7 @@ paths: "updated": "2024-08-02 15:01:00.000", "state": "invoice_created", "data": "{json}", + "isCredit": false, }, ], } @@ -1049,6 +1066,9 @@ components: type: string format: json example: { json } + isCredit: + type: boolean + example: false ContractStatus: type: object properties: From 3739eb33bd5181d5ff42a874958b547fb55bccc7 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 25 Oct 2024 15:55:52 +0200 Subject: [PATCH 11/11] DHIL-2644 - Processed review remarks. --- src/openapi/fiko/fiko-crud.yaml | 288 +++++++++++++++++++++++--------- 1 file changed, 213 insertions(+), 75 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index b555d46..a821dcb 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -13,6 +13,13 @@ paths: tags: - Transactions v2 parameters: + - in: query + name: transactionItemId + schema: + type: string + format: uuid + example: 75174a9d-fff4-4682-b66b-ebd93cbe7ea3 + description: The id of the transaction item. - in: query name: sourceName schema: @@ -166,36 +173,6 @@ paths: example: 9834b346-d68c-438d-9bd5-6716422c2657 required: true description: The id of the transaction item. - get: - summary: Get a single transaction item. - description: Get a single transaction item. - tags: - - Transactions v2 - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionItemId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - "sourceName": "Verkoopengine", - "transactionId": "1001236", - "transactionLineId": "1", - "name": "HTM Maandkorting 20%", - "quantity": 1, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "amountTax": 21, - "occurredOn": "2024-10-04T00:00:00Z", - "type": "debit", - "productCode": "HTM-MND-20", - "aggregationReference": "FIKO-123456", - "accountingSystemReference": "U4F-123456", - } patch: summary: Update a transaction item. description: Update a transaction item. @@ -331,7 +308,6 @@ paths: type: string format: uuid example: 498e11fd-86c7-4e26-8ca9-c5ed9049da9e - required: true description: The id of the audit trail. - in: query name: transactionItemId @@ -339,7 +315,6 @@ paths: type: string format: uuid example: 9834b346-d68c-438d-9bd5-6716422c2657 - required: true description: The id of the transaction item. - in: query name: user @@ -519,7 +494,7 @@ paths: "timestamp": "2022-01-01 00:00:00", "failureReason": { - "failureReasonId": "122be602-139d-49f5-b34f-1e3e2de29408", + "failureReasonId": 12, "reasonCode": "1234ABCD", "reasonDesc": "description", }, @@ -530,10 +505,118 @@ paths: ], }, ] + /processingfailures/{processingFailureId}: + parameters: + - in: path + name: processingFailureId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the processing failure. + patch: + summary: Update processing failure. + description: Update processing failure. + tags: + - Failures v2 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: { "status": "open", "occurence": 2 } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } + /processingfailures/{processingFailureId}/processingfailureinstances: + parameters: + - in: path + name: processingFailureId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the processing failure. + post: + summary: Add a processing failure instance to a processing failure. + description: Add a processing failure instance to a processing failure. + tags: + - Failures v2 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "timestamp": "2022-01-01 00:00:00", + "failureReasonId": 12, + "element": "costCenter", + "occurence": 1, + "change": "Adapt config", + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", + } + /processingfailureinstances/{processingFailureInstanceId}: + parameters: + - in: path + name: processingFailureInstanceId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: true + description: The id of the processing failure instance. + patch: + summary: Update processing failure instance. + description: Update processing failure instance. + tags: + - Failures v2 + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "timestamp": "2022-01-01 00:00:00", + "occurence": 2, + "change": "Adapt config", + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + example: + { + "processingFailureInstanceId": "37a8095b-19db-498f-9349-5f37d21c5bdf", + } /productmetadata: get: - summary: Get all product metadata. - description: Get all product metadata. + summary: Find product metadata. + description: Find product metadata. tags: - Metadata v2 parameters: @@ -581,11 +664,17 @@ paths: example: VERK_FACTUUR description: The document code. - in: query - name: timestampUpdated + name: updatedBefore schema: type: string example: 2022-01-01 00:00:00 - description: The timestamp updated. + description: Timestamp that the metadata was updated before. + - in: query + name: updatedAfter + schema: + type: string + example: 2022-01-01 00:00:00 + description: Timestamp that the metadata was updated after. - in: query name: validAt schema: @@ -811,7 +900,9 @@ paths: schema: $ref: "#/components/schemas/unavailable" example: - { "productContraAccountId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + { + "productContraAccountId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", + } /productmetadata/{productMetadataId}/metadataaudittrails: parameters: - in: path @@ -832,7 +923,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/postMetadataAuditTrailRequest" + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "department", + "oldValue": "900", + "newValue": "999", + } + ] + } responses: "201": description: Created @@ -969,7 +1073,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/postMetadataAuditTrailRequest" + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "contraAccountMetadataId", + "oldValue": "873810a3-a11a-4d4d-9af7-395520fa207c", + "newValue": "9a8eb116-5270-4ef9-81ef-fdc2e72c281a", + } + ] + } responses: "201": description: Created @@ -1136,7 +1253,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/postMetadataAuditTrailRequest" + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "taxCode", + "oldValue": null, + "newValue": "V21", + } + ] + } responses: "201": description: Created @@ -1157,7 +1287,6 @@ paths: type: string format: uuid example: 37a8095b-19db-498f-9349-5f37d21c5bdf - required: true description: The id of the source metadata. - in: query name: incomingName @@ -1314,7 +1443,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/postMetadataAuditTrailRequest" + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "businessOwner", + "oldValue": "Corneel Verstoep", + "newValue": "Mark Verheij", + } + ] + } responses: "201": description: Created @@ -1439,7 +1581,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/postMetadataAuditTrailRequest" + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "isOpen", + "oldValue": "true", + "newValue": "false", + } + ] + } responses: "201": description: Created @@ -1460,7 +1615,6 @@ paths: type: string format: uuid example: 37a8095b-19db-498f-9349-5f37d21c5bdf - required: true description: The id of the concession metadata. - in: query name: concessionId @@ -1594,7 +1748,20 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/postMetadataAuditTrailRequest" + $ref: "#/components/schemas/unavailable" + example: + { + "user": "rmeeuws", + "timestamp": "2024-10-04T00:00:00", + "correlationId": "a03cd0c2-38b5-4619-b9e3-d6e5b842e127", + "metadataChanges": [ + { + "fieldName": "percentage", + "oldValue": null, + "newValue": "23.456", + }, + ], + } responses: "201": description: Created @@ -1615,7 +1782,6 @@ paths: type: string format: uuid example: 37a8095b-19db-498f-9349-5f37d21c5bdf - required: true description: The id of the metadata audit trail. - in: query name: productMetadataId @@ -1792,34 +1958,6 @@ components: example: - "/account/12345" - "/account/67890" - postMetadataAuditTrailRequest: - type: object - properties: - user: - type: string - example: rmeeuws - timestamp: - type: string - format: date-time - example: 2024-10-04T00:00:00 - correlationId: - type: string - format: uuid - example: a03cd0c2-38b5-4619-b9e3-d6e5b842e127 - metadataChanges: - type: array - items: - type: object - properties: - fieldName: - type: string - example: businessOwner - oldValue: - type: string - example: Corneel Verstoep - newValue: - type: string - example: Jan-Willem Vermeij postMetadataAuditTrailResponse: type: object properties: