From 92eb911360ce8cc2cfe5fbf10522abdec134c4a8 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 5 Sep 2024 11:55:33 +0200 Subject: [PATCH 1/4] OVPAY-1040 - Added correlationId to ScheduledAction. --- src/openapi/contracts/contracts-crud.yaml | 44 ++++++++++++++--------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index e0afa7a..ebf7ac9 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -813,13 +813,6 @@ paths: example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf required: false description: OrderLineId of the action to perform. - - in: query - name: result - schema: - type: string - example: success - required: false - description: Result of the performed action. - in: query name: createdFrom schema: @@ -852,6 +845,13 @@ paths: example: 2024-07-02 15:01:00.000 required: false description: Find all tasks updated until this timestamp. + - in: query + name: correlationId + schema: + type: string + example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf + required: false + description: Pointer to executor of this action (e.g. the batch job). responses: "200": description: OK @@ -873,10 +873,11 @@ paths: "contractId": "e911532c-8049-4068-955d-6d1230321cba", "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "xspit|xtat|refundMethod|refundAmount", - "result": "successful call to GBO", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", }, ], } @@ -900,10 +901,11 @@ paths: "contractId": "e911532c-8049-4068-955d-6d1230321cba", "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "xspit|xtat|refundMethod|refundAmount", - "result": "successful call to GBO", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", }, } responses: @@ -955,10 +957,11 @@ paths: "contractId": "e911532c-8049-4068-955d-6d1230321cba", "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "xspit|xtat|refundMethod|refundAmount", - "result": "successful call to GBO", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", }, } patch: @@ -977,9 +980,10 @@ paths: { "scheduledActionStatus": 1, "executionTime": "2024-07-02 15:01:00.000", - "details": "xspit|xtat|refundMethod|refundAmount", - "result": "successful call to GBO", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", }, } responses: @@ -1257,10 +1261,12 @@ components: example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f details: type: string - example: xspit|xtat|refundMethod|refundAmount + format: json + example: { "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" } result: type: string - example: successful call to GBO + format: json + example: { "result": "", "timestamp": "" } created: type: string format: date-time @@ -1269,6 +1275,10 @@ components: type: string format: date-time example: 2024-07-02 15:01:00.000 + correlationId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f ScheduledActionType: type: object properties: From 4813c32735164425da5ecbae3fc61e90d8b9785d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 6 Sep 2024 09:17:05 +0200 Subject: [PATCH 2/4] OVPAY-1040 - Moved ScheduledActions to separate yaml --- src/openapi/contracts/contracts-crud.yaml | 340 ------------------ src/openapi/util/util-crud.yaml | 398 ++++++++++++++++++++++ 2 files changed, 398 insertions(+), 340 deletions(-) create mode 100644 src/openapi/util/util-crud.yaml diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index ebf7ac9..7723ded 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -748,277 +748,6 @@ paths: "contractActionId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", }, } - /scheduledactions: - get: - summary: Get all scheduled actions. - description: Get all scheduled actions. - tags: - - ScheduledAction - parameters: - - in: query - name: scheduledActionTypeId - schema: - type: array - items: - type: integer - explode: false - required: false - description: Filter on possible ScheduledAction types. 1 = gbo-refund. - - in: query - name: scheduledActionStatusId - schema: - type: array - items: - type: integer - explode: false - required: false - description: Filter on possible ScheduledAction statuses. 1 = created, 2 = pending, 3 = processed, 4 = failed. - - in: query - name: executionTimeFrom - schema: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - required: false - description: Execution timestmap (from). - - in: query - name: executionTimeUntil - schema: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - required: false - description: Execution timestmap (until). - - in: query - name: contractId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: ContractId of the action to perform. - - in: query - name: orderId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: OrderId of the action to perform. - - in: query - name: orderLineId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: OrderLineId of the action to perform. - - in: query - name: createdFrom - schema: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - required: false - description: Find all tasks created from this timestamp. - - in: query - name: createdUntil - schema: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - required: false - description: Find all tasks created until this timestamp. - - in: query - name: updatedFrom - schema: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - required: false - description: Find all tasks updated from this timestamp. - - in: query - name: updatedUntil - schema: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - required: false - description: Find all tasks updated until this timestamp. - - in: query - name: correlationId - schema: - type: string - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: Pointer to executor of this action (e.g. the batch job). - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ScheduledAction" - example: - { - "scheduledActions": - [ - { - "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", - "scheduledActionType": - { "scheduledActionTypeId": 1, "name": "gbo-refund" }, - "scheduledActionStatus": - { "scheduledActionStatusId": 1, "name": "created" }, - "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", - "created": "2024-07-02 15:01:00.000", - "updated": "2024-07-02 15:01:00.000", - "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", - }, - ], - } - post: - summary: Add a new scheduled action. - description: Add a new scheduled action. - tags: - - ScheduledAction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ScheduledAction" - example: - { - "scheduledAction": - { - "scheduledActionType": 1, - "scheduledActionStatus": 1, - "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", - "created": "2024-07-02 15:01:00.000", - "updated": "2024-07-02 15:01:00.000", - "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", - }, - } - responses: - "201": - description: CREATED - content: - application/json: - schema: - $ref: "#/components/schemas/ContractAction" - example: - { - "scheduledAction": - { - "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", - }, - } - /scheduledactions/{scheduledActionId}: - parameters: - - in: path - name: scheduledActionId - schema: - type: string - format: uuid - example: d1dd439b-6072-4b97-89c9-724268865b93 - required: true - description: The id of the ScheduledAction, formatted as UUID. - get: - summary: Get a specific scheduled action. - description: Get a specific scheduled action. - tags: - - ScheduledAction - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ScheduledAction" - example: - { - "scheduledAction": - { - "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", - "scheduledActionType": - { "scheduledActionTypeId": 1, "name": "gbo-refund" }, - "scheduledActionStatus": - { "scheduledActionStatusId": 1, "name": "created" }, - "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", - "created": "2024-07-02 15:01:00.000", - "updated": "2024-07-02 15:01:00.000", - "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", - }, - } - patch: - summary: Update a specific scheduled action. - description: Update a specific scheduled action. - tags: - - ScheduledAction - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ScheduledAction" - example: - { - "scheduledAction": - { - "scheduledActionStatus": 1, - "executionTime": "2024-07-02 15:01:00.000", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", - "updated": "2024-07-02 15:01:00.000", - "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", - }, - } - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ScheduledAction" - example: - { - "scheduledAction": - { - "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", - }, - } - delete: - summary: Delete a specific scheduled action. - description: Delete a specific scheduled action. - tags: - - ScheduledAction - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/ScheduledAction" - example: - { - "scheduledAction": - { - "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", - }, - } /contractstatuses: get: summary: Return a list of all possible values of the ContractStatus reference table. Used for populating drop down lists for example. @@ -1230,75 +959,6 @@ components: type: string format: json example: { json } - ScheduledAction: - type: object - properties: - scheduledActionId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - scheduledActionType: - type: object - $ref: "#/components/schemas/ScheduledActionType" - scheduledActionStatus: - type: object - $ref: "#/components/schemas/ScheduledActionStatus" - executionTime: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - contractId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - orderId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - orderLineId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - details: - type: string - format: json - example: { "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" } - result: - type: string - format: json - example: { "result": "", "timestamp": "" } - created: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - updated: - type: string - format: date-time - example: 2024-07-02 15:01:00.000 - correlationId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - ScheduledActionType: - type: object - properties: - scheduledActionTypeId: - type: integer - example: 1 - name: - type: string - enum: [gbo-refund] - example: gbo-refund - ScheduledActionStatus: - type: object - properties: - scheduledActionStatusId: - type: integer - example: 1 - name: - type: string - enum: [created, pending, processed, failed] - example: created ContractStatus: type: object properties: diff --git a/src/openapi/util/util-crud.yaml b/src/openapi/util/util-crud.yaml new file mode 100644 index 0000000..9d54722 --- /dev/null +++ b/src/openapi/util/util-crud.yaml @@ -0,0 +1,398 @@ +openapi: "3.0.3" +info: + title: ABT Utility CRUD APIs + version: "1.0" + description: CRUD APIs for ABT Utility tables. These are NOT the functional APIs from Service Engine. +servers: + - url: https://api.integratielaag.nl/v1 +paths: + /scheduledactions: + get: + summary: Get all scheduled actions. + description: Get all scheduled actions. + tags: + - ScheduledAction + parameters: + - in: query + name: scheduledActionTypeId + schema: + type: array + items: + type: integer + explode: false + required: false + description: Filter on possible ScheduledAction types. 1 = gbo-refund. + - in: query + name: scheduledActionStatusId + schema: + type: array + items: + type: integer + explode: false + required: false + description: Filter on possible ScheduledAction statuses. 1 = created, 2 = pending, 3 = processed, 4 = failed. + - in: query + name: executionTimeFrom + schema: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + required: false + description: Execution timestmap (from). + - in: query + name: executionTimeUntil + schema: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + required: false + description: Execution timestmap (until). + - in: query + name: contractId + schema: + type: string + format: uuid + example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf + required: false + description: ContractId of the action to perform. + - in: query + name: orderId + schema: + type: string + format: uuid + example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf + required: false + description: OrderId of the action to perform. + - in: query + name: orderLineId + schema: + type: string + format: uuid + example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf + required: false + description: OrderLineId of the action to perform. + - in: query + name: createdFrom + schema: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + required: false + description: Find all tasks created from this timestamp. + - in: query + name: createdUntil + schema: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + required: false + description: Find all tasks created until this timestamp. + - in: query + name: updatedFrom + schema: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + required: false + description: Find all tasks updated from this timestamp. + - in: query + name: updatedUntil + schema: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + required: false + description: Find all tasks updated until this timestamp. + - in: query + name: correlationId + schema: + type: string + example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf + required: false + description: Pointer to executor of this action (e.g. the batch job). + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledAction" + example: + { + "scheduledActions": + [ + { + "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", + "scheduledActionType": + { "scheduledActionTypeId": 1, "name": "gbo-refund" }, + "scheduledActionStatus": + { "scheduledActionStatusId": 1, "name": "created" }, + "executionTime": "2024-07-02 15:01:00.000", + "contractId": "e911532c-8049-4068-955d-6d1230321cba", + "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", + "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "created": "2024-07-02 15:01:00.000", + "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + }, + ], + } + post: + summary: Add a new scheduled action. + description: Add a new scheduled action. + tags: + - ScheduledAction + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledAction" + example: + { + "scheduledAction": + { + "scheduledActionType": 1, + "scheduledActionStatus": 1, + "executionTime": "2024-07-02 15:01:00.000", + "contractId": "e911532c-8049-4068-955d-6d1230321cba", + "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", + "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "created": "2024-07-02 15:01:00.000", + "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + }, + } + responses: + "201": + description: CREATED + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledAction" + example: + { + "scheduledAction": + { + "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", + }, + } + /scheduledactions/{scheduledActionId}: + parameters: + - in: path + name: scheduledActionId + schema: + type: string + format: uuid + example: d1dd439b-6072-4b97-89c9-724268865b93 + required: true + description: The id of the ScheduledAction, formatted as UUID. + get: + summary: Get a specific scheduled action. + description: Get a specific scheduled action. + tags: + - ScheduledAction + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledAction" + example: + { + "scheduledAction": + { + "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", + "scheduledActionType": + { "scheduledActionTypeId": 1, "name": "gbo-refund" }, + "scheduledActionStatus": + { "scheduledActionStatusId": 1, "name": "created" }, + "executionTime": "2024-07-02 15:01:00.000", + "contractId": "e911532c-8049-4068-955d-6d1230321cba", + "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", + "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "created": "2024-07-02 15:01:00.000", + "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + }, + } + patch: + summary: Update a specific scheduled action. + description: Update a specific scheduled action. + tags: + - ScheduledAction + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledAction" + example: + { + "scheduledAction": + { + "scheduledActionStatus": 1, + "executionTime": "2024-07-02 15:01:00.000", + "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", + "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "updated": "2024-07-02 15:01:00.000", + "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + }, + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledAction" + example: + { + "scheduledAction": + { + "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", + }, + } + delete: + summary: Delete a specific scheduled action. + description: Delete a specific scheduled action. + tags: + - ScheduledAction + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledAction" + example: + { + "scheduledAction": + { + "scheduledActionId": "d1dd439b-6072-4b97-89c9-724268865b93", + }, + } + /scheduledactiontypes: + get: + summary: Return a list of all possible values of the ScheduledActionType reference table. Used for populating drop down lists for example. + description: Return a list of all possible values of the ScheduledActionType reference table. Used for populating drop down lists for example. + tags: + - Reference Tables + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledActionType" + example: + { + "scheduledActionTypes": + [ + { "scheduledActionTypeId": 1, "name": "gbo-refund" }, + ], + } + /scheduledactionstatuses: + get: + summary: Return a list of all possible values of the ScheduledActionStatus reference table. Used for populating drop down lists for example. + description: Return a list of all possible values of the ScheduledActionStatus reference table. Used for populating drop down lists for example. + tags: + - Reference Tables + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ScheduledActionStatus" + example: + { + "scheduledActionStatuses": + [ + { "scheduledActionStatusId": 1, "name": "created" }, + { "scheduledActionStatusId": 2, "name": "pending" }, + { "scheduledActionStatusId": 3, "name": "processed" }, + { "scheduledActionStatusId": 4, "name": "failed" }, + ], + } +components: + securitySchemes: + bearerToken: + type: http + scheme: bearer + bearerFormat: JWT + schemas: + ScheduledAction: + type: object + properties: + scheduledActionId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + scheduledActionType: + type: object + $ref: "#/components/schemas/ScheduledActionType" + scheduledActionStatus: + type: object + $ref: "#/components/schemas/ScheduledActionStatus" + executionTime: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + contractId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + orderId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + orderLineId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + details: + type: string + format: json + example: { "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" } + result: + type: string + format: json + example: { "result": "", "timestamp": "" } + created: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + updated: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + correlationId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + ScheduledActionType: + type: object + properties: + scheduledActionTypeId: + type: integer + example: 1 + name: + type: string + enum: [gbo-refund] + example: gbo-refund + ScheduledActionStatus: + type: object + properties: + scheduledActionStatusId: + type: integer + example: 1 + name: + type: string + enum: [created, pending, processed, failed] + example: created From d2162df0a0d02b8b9d8523d31cbe38ad6cab6863 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 6 Sep 2024 10:23:20 +0200 Subject: [PATCH 3/4] OVPAY-810 - Added DHIL calls. --- src/openapi/contracts/contracts-crud.yaml | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index 7723ded..fbd0e25 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -543,6 +543,43 @@ paths: example: d1dd439b-6072-4b97-89c9-724268865b93 required: true description: The contractId of the Contract, formatted as UUID. + get: + summary: Get invoices of a single contract. + description: Get invoices of a single contract. + deprecated: true + tags: + - ContractInvoice + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ContractInvoice" + example: + { + "contractInvoices": + [ + { + "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", + "externalReference": "F2024-0001", + "term": 1, + "created": "2024-07-02 15:01:00.000", + "updated": "2024-07-02 15:01:00.000", + "state": "invoice_sent", + "data": "{json}", + }, + { + "contractInvoiceId": "dadff658-4ff5-4eb8-b516-492f1f6c6245", + "externalReference": "F2024-0002", + "term": 2, + "created": "2024-08-02 15:01:00.000", + "updated": "2024-08-02 15:01:00.000", + "state": "invoice_created", + "data": "{json}", + }, + ], + } post: summary: Add an invoice to an existing contract. description: Add an invoice to an existing contract. @@ -713,6 +750,41 @@ paths: example: d1dd439b-6072-4b97-89c9-724268865b93 required: true description: The contractId of the Contract, formatted as UUID. + get: + summary: Get all actions of a single contract. + description: Get all actions of a single contract. + deprecated: true + tags: + - ContractAction + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/Contract" + example: + { + "contractActions": + [ + { + "contractActionId": "67687851-59dd-4bbc-aa74-0f7abd26c883", + "actionType": { "actionTypeId": 1, "name": "create" }, + "user": "subid123456", + "timestamp": "2024-07-02 15:01:00.000", + "details": "Contract created", + "correlationId": "976e7a4c-bf24-43d2-b444-55817556e7ee", + }, + { + "contractActionId": "ea9ad287-9cd3-4e76-bcb9-d71db551cf55", + "actionType": { "actionTypeId": 2, "name": "change" }, + "user": "subid123456", + "timestamp": "2024-07-03 15:01:00.000", + "details": "Contract changed", + "correlationId": "e2462347-6749-4841-b42a-cf8de19ec727", + }, + ], + } post: summary: Add a new action to an existing contract. description: Add a new action to an existing contract. From ebe70cba6d28be907c8e996548a8a0afe5dc8f21 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 9 Sep 2024 17:04:40 +0200 Subject: [PATCH 4/4] OVPAY-1040 - Processed review remarks from Andre. --- src/openapi/util/util-crud.yaml | 150 ++++++++++++++++++++------------ 1 file changed, 93 insertions(+), 57 deletions(-) diff --git a/src/openapi/util/util-crud.yaml b/src/openapi/util/util-crud.yaml index 9d54722..6788888 100644 --- a/src/openapi/util/util-crud.yaml +++ b/src/openapi/util/util-crud.yaml @@ -47,30 +47,6 @@ paths: example: 2024-07-02 15:01:00.000 required: false description: Execution timestmap (until). - - in: query - name: contractId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: ContractId of the action to perform. - - in: query - name: orderId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: OrderId of the action to perform. - - in: query - name: orderLineId - schema: - type: string - format: uuid - example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf - required: false - description: OrderLineId of the action to perform. - in: query name: createdFrom schema: @@ -110,6 +86,20 @@ paths: example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf required: false description: Pointer to executor of this action (e.g. the batch job). + - in: query + name: resourceName + schema: + type: string + example: contracts + required: false + description: Name of the resource concerning the scheduled action. + - in: query + name: resourceIdentifier + schema: + type: string + example: 65ad5520-4e62-41b7-89dd-a01be6cb78bf + required: false + description: Id of the resource concerning the scheduled action. responses: "200": description: OK @@ -128,14 +118,20 @@ paths: "scheduledActionStatus": { "scheduledActionStatusId": 1, "name": "created" }, "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "scheduledActionResources": + [ + { + "scheduledActionResourceId": "7e4b7d7a-4266-47c5-b482-f1a00379c493", + "resourceName": + { "resourceNameId": 1, "name": "contracts" }, + "resourceIdentifier": "70d29a0a-176d-4184-8cba-08416eccb361", + }, + ], }, ], } @@ -156,14 +152,18 @@ paths: "scheduledActionType": 1, "scheduledActionStatus": 1, "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "scheduledActionResources": + [ + { + "resourceNameId": 1, + "resourceIdentifier": "70d29a0a-176d-4184-8cba-08416eccb361", + }, + ], }, } responses: @@ -212,14 +212,20 @@ paths: "scheduledActionStatus": { "scheduledActionStatusId": 1, "name": "created" }, "executionTime": "2024-07-02 15:01:00.000", - "contractId": "e911532c-8049-4068-955d-6d1230321cba", - "orderId": "6c512776-7365-4d29-8ddb-b30e826a2dfb", - "orderLineId": "161a3e25-ca15-47b8-b68e-e585cc3ff171", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "created": "2024-07-02 15:01:00.000", "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", + "scheduledActionResources": + [ + { + "scheduledActionResourceId": "7e4b7d7a-4266-47c5-b482-f1a00379c493", + "resourceName": + { "resourceNameId": 1, "name": "contracts" }, + "resourceIdentifier": "70d29a0a-176d-4184-8cba-08416eccb361", + }, + ], }, } patch: @@ -238,8 +244,8 @@ paths: { "scheduledActionStatus": 1, "executionTime": "2024-07-02 15:01:00.000", - "details": "{ \"xspit\": \"\", \"xtat\": \"\", \"refundMethod\": \"\", \"refundAmount\": \"\" }", - "result": "{ \"result\": \"\", \"timestamp\": \"\" }", + "details": '{ "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" }', + "result": '{ "result": "", "timestamp": "" }', "updated": "2024-07-02 15:01:00.000", "correlationId": "fb4443c6-5a6a-47a3-adf0-db3dfc183399", }, @@ -293,9 +299,7 @@ paths: example: { "scheduledActionTypes": - [ - { "scheduledActionTypeId": 1, "name": "gbo-refund" }, - ], + [{ "scheduledActionTypeId": 1, "name": "gbo-refund" }], } /scheduledactionstatuses: get: @@ -320,6 +324,27 @@ paths: { "scheduledActionStatusId": 4, "name": "failed" }, ], } + /resourcenames: + get: + summary: Return a list of all possible values of the ResourceName reference table. Used for populating drop down lists for example. + description: Return a list of all possible values of the ResourceName reference table. Used for populating drop down lists for example. + tags: + - Reference Tables + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ResourceName" + example: + { + "resourceNames": + [ + { "resourceNameId": 1, "name": "contracts" }, + { "resourceNameId": 2, "name": "orders" }, + ], + } components: securitySchemes: bearerToken: @@ -344,22 +369,11 @@ components: type: string format: date-time example: 2024-07-02 15:01:00.000 - contractId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - orderId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f - orderLineId: - type: string - format: uuid - example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f details: type: string format: json - example: { "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" } + example: + { "xspit": "", "xtat": "", "refundMethod": "", "refundAmount": "" } result: type: string format: json @@ -396,3 +410,25 @@ components: type: string enum: [created, pending, processed, failed] example: created + ScheduledActionResource: + type: object + properties: + scheduledActionResourceId: + type: string + format: uuid + example: 70d29a0a-176d-4184-8cba-08416eccb361 + resourceName: + type: object + $ref: "#/components/schemas/ResourceName" + resourceIdentifier: + type: string + example: 70d29a0a-176d-4184-8cba-08416eccb361 + ResourceName: + type: object + properties: + resourceNameId: + type: integer + example: 1 + name: + type: string + example: contracts