diff --git a/src/openapi/contracts/contracts-crud.yaml b/src/openapi/contracts/contracts-crud.yaml index 963bf1e..6733363 100644 --- a/src/openapi/contracts/contracts-crud.yaml +++ b/src/openapi/contracts/contracts-crud.yaml @@ -213,6 +213,19 @@ paths: "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "32785417-1fb8-42c7-bda1-533f5868809f", + "accountingStatus": + { + "accountingStatusId": 1, + "name": "open", + }, + "createdOn": "2024-06-02 15:01:00.000", + "description": null, + }, + ], }, { "contractInvoiceId": "1c345237-4d84-47f0-93c2-7b94338e3355", @@ -222,6 +235,19 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "1e95b854-0094-42a4-9268-c16353fb72a8", + "accountingStatus": + { + "accountingStatusId": 1, + "name": "open", + }, + "createdOn": "2024-07-02 15:01:00.000", + "description": null, + }, + ], }, ], "contractVersions": @@ -271,6 +297,19 @@ paths: "updated": "2024-06-02 15:01:00.000", "state": "invoice_created", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "32785417-1fb8-42c7-bda1-533f5868809f", + "accountingStatus": + { + "accountingStatusId": 1, + "name": "open", + }, + "createdOn": "2024-06-02 15:01:00.000", + "description": null, + }, + ], }, { "contractInvoiceId": "1c345237-4d84-47f0-93c2-7b94338e3355", @@ -280,6 +319,19 @@ paths: "updated": "2024-07-02 15:01:00.000", "state": "invoice_created", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "1e95b854-0094-42a4-9268-c16353fb72a8", + "accountingStatus": + { + "accountingStatusId": 1, + "name": "open", + }, + "createdOn": "2024-07-02 15:01:00.000", + "description": null, + }, + ], }, ], "contractVersions": @@ -400,6 +452,16 @@ paths: "state": "invoice_created", "data": "{json}", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "32785417-1fb8-42c7-bda1-533f5868809f", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-06-02 15:01:00.000", + "description": null, + }, + ], }, ], }, @@ -459,7 +521,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ContractVersion" + $ref: "#/components/schemas/InvoiceAccountingStatus" example: { "contractVersion": @@ -567,6 +629,16 @@ paths: "state": "invoice_sent", "data": "{json}", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "32785417-1fb8-42c7-bda1-533f5868809f", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-06-02 15:01:00.000", + "description": null, + }, + ], }, { "contractInvoiceId": "dadff658-4ff5-4eb8-b516-492f1f6c6245", @@ -577,6 +649,16 @@ paths: "state": "invoice_created", "data": "{json}", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "84af0f01-0416-4860-851a-a0d4b3cf674a", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-06-02 15:01:00.000", + "description": null, + }, + ], }, ], } @@ -601,6 +683,15 @@ paths: "state": "invoice_created", "data": "{json}", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": 1, + "createdOn", + "2024-07-02 15:01:00.000", + "description": null, + }, + ], }, } responses: @@ -721,6 +812,16 @@ paths: "state": "invoice_created", "data": "{json}", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "32785417-1fb8-42c7-bda1-533f5868809f", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-06-02 15:01:00.000", + "description": null, + }, + ], }, { "contractId": "a7452e22-3894-40cc-87d6-869370a92277", @@ -732,6 +833,16 @@ paths: "state": "invoice_created", "data": "{json}", "isCredit": false, + "invoiceAccountingStatuses": + [ + { + "invoiceAccountingStatusId": "84af0f01-0416-4860-851a-a0d4b3cf674a", + "accountingStatus": + { "accountingStatusId": 1, "name": "open" }, + "createdOn": "2024-08-02 15:01:00.000", + "description": null, + }, + ], }, ], } @@ -778,6 +889,43 @@ paths: "contractInvoiceId": "8699d72a-cf4d-4e6b-9e9c-549d837ca51f", }, } + /contractinvoices/{contractInvoiceId}/invoiceaccountingstatuses: + parameters: + - in: path + name: contractInvoiceId + schema: + type: string + format: uuid + example: d1dd439b-6072-4b97-89c9-724268865b93 + required: true + description: The id of the ContractInvoice, formatted as UUID. + post: + summary: Add a new invoice accounting status to a contract invoice. + description: Add a new invoice accounting status to a contract invoice. + tags: + - ContractInvoice + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContractInvoice" + example: + { + "accountingStatusId": 1, + "createdOn": "2024-07-02 15:01:00.000", + "description": null, + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/ContractInvoice" + example: + { + "invoiceAccountingStatusId": "a6836364-4812-4960-9226-69deb2e2b903", + } /contracts/{contractId}/contractactions: parameters: - in: path @@ -1068,6 +1216,37 @@ components: isCredit: type: boolean example: false + InvoiceAccountingStatus: + type: object + properties: + invoiceAccountingStatusId: + type: string + format: uuid + example: 6b6f0f5e-5d3f-4a6d-8e7d-6a7d0f9e6c5b + contractInvoiceId: + type: string + format: uuid + example: 8699d72a-cf4d-4e6b-9e9c-549d837ca51f + accountingStatus: + type: object + $ref: "#/components/schemas/AccountingStatus" + createdOn: + type: string + format: date-time + example: 2024-07-02 15:01:00.000 + description: + type: string + example: Open + AccountingStatus: + type: object + properties: + accountingStatusId: + type: integer + example: 1 + name: + type: string + enum: [open, sent, received, rejected] + example: open ContractStatus: type: object properties: @@ -1076,7 +1255,16 @@ components: example: 2 name: type: string - enum: [new, active, suspended, cancelled, terminated, pending cancellation, pending termination] + enum: + [ + new, + active, + suspended, + cancelled, + terminated, + pending cancellation, + pending termination, + ] example: active ActionType: type: object