From eab79163cfb971c984053322e9dc94d2d8b80c75 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 25 Nov 2024 17:03:28 +0100 Subject: [PATCH 01/19] First commit, still WIP --- src/openapi/customers/SE-customers.yaml | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/openapi/customers/SE-customers.yaml diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml new file mode 100644 index 0000000..6e4a7a8 --- /dev/null +++ b/src/openapi/customers/SE-customers.yaml @@ -0,0 +1,54 @@ +openapi: 3.0.1 +info: + title: Service Engine APIs for Customers + description: >- + Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. + To be used by touchpoints to get information about HTM customers. + version: '1.0' +servers: + - url: https://api.integratielaag.nl/abt/serviceengine/customers/1.0 +tags: + - name: ServiceEngine Customers + description: >- + Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. + To be used by touchpoints to get information about HTM customers. +paths: + /customers/tokens/{tokenId}/product-instances: + get: + tags: + - ServiceEngine Customers + summary: Get a list of all HTM products instantiated on the given OvPayToken + description: |- + Get a list of all HTM products instantiated on the given OvPayToken. + Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances. + Where relevant, operations to be performed are returned as HATEOAS links per product-instance. + parameters: + - name: tokenId + in: path + required: true + style: simple + description: Id of the OvPayToken to get product-instances for. + schema: + type: integer + example: 1 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TokenProductInstancesResponse' + examples: + getEmptyProductInstances: + summary: No product-instances found on token + value: + Entries: [] +components: + schemas: + TokenProductInstancesResponse: + type: object + required: + - Entries + properties: + Entries: + type: array From 3eb98b0d237371cc35b0a6ad8373e7dd2c7ef0f5 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 2 Dec 2024 14:59:28 +0000 Subject: [PATCH 02/19] Update src/openapi/customers/SE-customers.yaml Added Get Customer V2- first draft --- src/openapi/customers/SE-customers.yaml | 123 ++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index 6e4a7a8..a9316b9 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -13,6 +13,127 @@ tags: Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. To be used by touchpoints to get information about HTM customers. paths: + /customers: + get: + tags: + - ServiceEngine Customers + summary: Get a customer profile based on search parameters, only returns a unique profile + parameters: + - name: customerProfileId + in: query + schema: + type: integer + example: 1 + - name: customerNumber + in: query + schema: + type: integer + example: 1 + - name: debtorNumber + in: query + schema: + type: integer + example: 1 + - name: birthname + in: query + schema: + type: string + example: Jon + - name: surname + in: query + schema: + type: string + example: Doe + - name: emailAdress + in: query + schema: + type: string + format: email + example: jon.doe@mymailprovider.com + - name: dateOfBirth + in: query + schema: + type: string + format: date + example: "2000-01-01" + - name: addressStreet + in: query + schema: + type: string + example: Sesamestreet + - name: addressHouseNumber + in: query + schema: + type: integer + example: 1 + - name: addressHouseNumberSuffix + in: query + schema: + type: string + example: A + - name: addressPostalCode + in: query + schema: + type: string + example: 1234 AB + - name: addressCity + in: query + schema: + type: string + example: The Hague + - name: addressCountry + in: query + schema: + type: string + example: The Netherlands + - name: phoneNumber + in: query + schema: + type: string + example: The Netherlands + - name: ovChipcardNumber + in: query + schema: + type: integer + example: 0123456789 + - name: OvChipcardAlias + in: query + schema: + type: string + example: My ovchipcard + - name: ovPayTokenNumber + in: query + schema: + type: integer + example: 0123456789 + - name: ovPayTokenAlias + in: query + schema: + type: string + example: My Ov Pay Token + - name: ovPayTokenXTat + in: query + schema: + type: string + example: 180d04e0-a721-447e-a1d9-b416937b43bc + - name: ovPayTokenXBot + in: query + schema: + type: string + example: e1307c73-676a-4d07-967b-6141276f7c7c + responses: + '200': + description: Ok + content: + application/json: + schema: + $ref: '#/components/schemas/CustomersResponse' + '404': + description: Customer not found + content: + application/json: + schema: + $ref: '#/components/schemas/CustomersResponse' /customers/tokens/{tokenId}/product-instances: get: tags: @@ -52,3 +173,5 @@ components: properties: Entries: type: array + CustomersResponse: + type: object From feaaec2a5312c513ef1287694bb5349ddee7ab5c Mon Sep 17 00:00:00 2001 From: Max Martens Date: Tue, 3 Dec 2024 09:00:49 +0100 Subject: [PATCH 03/19] WIP GET customers, GET OvPayTokens with HATEOAS --- src/openapi/customers/SE-customers.yaml | 392 +++++++++++++++++++++++- 1 file changed, 379 insertions(+), 13 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index a9316b9..1f0c2cd 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -13,11 +13,12 @@ tags: Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. To be used by touchpoints to get information about HTM customers. paths: - /customers: + /customers: get: tags: - ServiceEngine Customers - summary: Get a customer profile based on search parameters, only returns a unique profile + summary: Get a single customer profile based on search parameters + description: Get a single customer profile based on search parameters. Only returns a profile if a single result matches the parameters; when multiple results are found, additional seach parameters are required to disambiguate. parameters: - name: customerProfileId in: query @@ -28,17 +29,17 @@ paths: in: query schema: type: integer - example: 1 + example: 1000001 - name: debtorNumber in: query schema: type: integer - example: 1 + example: 100001 - name: birthname in: query schema: type: string - example: Jon + example: John - name: surname in: query schema: @@ -49,7 +50,7 @@ paths: schema: type: string format: email - example: jon.doe@mymailprovider.com + example: john.doe@mymailprovider.com - name: dateOfBirth in: query schema: @@ -90,7 +91,7 @@ paths: in: query schema: type: string - example: The Netherlands + example: "0123456789" - name: ovChipcardNumber in: query schema: @@ -123,17 +124,53 @@ paths: example: e1307c73-676a-4d07-967b-6141276f7c7c responses: '200': - description: Ok + description: OK content: application/json: schema: $ref: '#/components/schemas/CustomersResponse' '404': - description: Customer not found + description: No customer found content: application/json: - schema: - $ref: '#/components/schemas/CustomersResponse' + example: + { + "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "apiErrorCode": "400.1", + "title": "Niet gevonden", + "detail": "Klant niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [ + { + "subApiErrorCode": "0017" + } + ] + } + '409': + description: Multiple customers found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "apiErrorCode": "409.1", + "title": "Meer dan 1 klantprofiel gevonden", + "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7" + } + /customers/tokens: + get: + tags: + - ServiceEngine Customers + summary: Get a list of all OvPayTokens for a certain customer + description: Get a list of all OvPayTokens for a certain customer. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OvPayTokensResponse' /customers/tokens/{tokenId}/product-instances: get: tags: @@ -166,6 +203,335 @@ paths: Entries: [] components: schemas: + CustomersResponse: + type: object + properties: + customerProfileId: + type: integer + example: 1 + customerNumber: + type: integer + example: 1000001 + debtorNumber: + type: string + example: DB100001 + customerStatus: + type: object + properties: + customerStatusId: + type: integer + example: 1 + name: + type: string + example: Active + person: + type: object + properties: + prefix: + type: string + example: Mr + birthname: + type: string + example: John + surname: + type: string + example: Doe + suffix: + type: string + example: Jr. + dateOfBirth: + type: string + format: date + example: '2023-02-01' + emailAdress: + type: string + format: email + example: 4j2dD@example.com + addresses: + type: array + items: + type: object + properties: + addressId: + type: integer + example: 1 + isPreferred: + type: boolean + example: true + addressType: + type: object + properties: + addressTypeId: + type: integer + example: 1 + name: + type: string + example: Brug + street: + type: string + example: Appelstraat + houseNumber: + type: integer + example: 1 + houseNumberSuffix: + type: string + example: BS + postalCode: + type: string + example: 1234AB + city: + type: string + example: Den Haag + country: + type: string + example: Nederland + _links: + type: object + properties: + delete: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/addresses/1 + method: + type: string + example: DELETE + phones: + type: array + items: + type: object + properties: + phoneId: + type: integer + example: 1 + isPreferred: + type: boolean + example: true + phoneType: + type: object + properties: + phoneTypeId: + type: integer + example: 1 + name: + type: string + example: Mobiel + number: + type: string + example: "0123456789" + countryCode: + type: string + example: "0031" + _links: + type: object + properties: + delete: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/phones/1 + method: + type: string + example: DELETE + _links: + type: object + properties: + partial_edit: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers + method: + type: string + example: PATCH + templated: + type: boolean + example: true + get_tokens: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + method: + type: string + example: GET + templated: + type: boolean + example: true + create_token: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + method: + type: string + example: POST + templated: + type: boolean + example: true + _templates: + type: object + properties: + partial_edit: + type: object + properties: + method: + type: string + example: PATCH + properties: + example: + [ + { name: person, required: true, properties: [ + { name: prefix, required: false, type: string }, + { name: birthname, required: false, type: string }, + { name: surname, required: false, type: string }, + { name: suffix, required: false, type: string }, + { name: dateOfBirth, required: false, type: string }, + { name: emailAdress, required: false, type: string }, + { name: addresses, required: false, multi: true, properties: [ + { name: addressId, required: false, type: integer }, + { name: isPreferred, required: false, type: boolean }, + { name: addressTypeId, required: false, type: integer }, + { name: street, required: false, type: string }, + { name: houseNumber, required: false, type: integer }, + { name: houseNumberSuffix, required: false, type: string }, + { name: postalCode, required: false, type: string }, + { name: city, required: false, type: string }, + { name: country, required: false, type: string } + ]}, + { name: phones, required: false, multi: true, properties: [ + { name: phoneId, required: false, type: integer }, + { name: isPreferred, required: false, type: boolean }, + { name: phoneTypeId, required: false, type: integer }, + { name: number, required: false, type: string }, + { name: countryCode, required: false, type: string } + ]} + ] } + ] + create_token: + type: object + properties: + method: + type: string + example: POST + properties: + example: + [ + { name: ovPayToken, required: true, properties: [ + { name: tokenTypeId, required: true, type: integer }, + { name: alias, required: true, type: string }, + { name: serviceReferenceId, required: false, type: string }, + { name: amount, required: false, type: integer }, + ]} + ] + + OvPayTokensResponse: + type: object + required: + - ovPayTokens + properties: + Entries: + type: array + items: + type: object + properties: + ovPayTokenId: + type: integer + example: 1 + tokenType: + type: object + properties: + tokenTypeId: + type: integer + example: 1 + name: + type: string + example: EMV + alias: + type: string + example: MyToken + tokenStatus: + type: object + properties: + tokenStatusId: + type: integer + example: 1 + name: + type: string + example: Active + expirationDate: + type: string + format: date + example: '2023-02-01' + replacedByTokenId: + type: integer + example: 1 + _links: + type: object + properties: + partial_edit: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + method: + type: string + example: PATCH + templated: + type: boolean + example: true + delete: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + method: + type: string + example: DELETE + product-instances: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/product-instances + method: + type: string + example: GET + trips: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/trips + method: + type: string + example: GET + _templates: + type: object + properties: + partial_edit: + type: object + properties: + method: + type: string + example: PATCH + properties: + example: + [ + { name: ovPayToken, required: true, properties: [ + { name: tokenStatusId, required: false, type: integer }, + { name: alias, required: false, type: string } + ]} + ] + + TokenProductInstancesResponse: type: object required: @@ -173,5 +539,5 @@ components: properties: Entries: type: array - CustomersResponse: - type: object + + From 33eef638d2c28b55be719586276a24fdde27ba46 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Tue, 3 Dec 2024 09:43:43 +0100 Subject: [PATCH 04/19] WIP update --- src/openapi/customers/SE-customers.yaml | 48 ++++++++++++++++++++----- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index 1f0c2cd..e85f1d7 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -195,12 +195,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TokenProductInstancesResponse' + $ref: '#/components/schemas/OvPayTokenProductInstancesResponse' examples: getEmptyProductInstances: summary: No product-instances found on token value: - Entries: [] + productInstances: [] components: schemas: CustomersResponse: @@ -486,6 +486,18 @@ components: templated: type: boolean example: true + replace: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/replace + method: + type: string + example: POST + templated: + type: boolean + example: true delete: type: object properties: @@ -525,19 +537,39 @@ components: properties: example: [ - { name: ovPayToken, required: true, properties: [ - { name: tokenStatusId, required: false, type: integer }, + { name: ovPayToken, required: true, properties: [ { name: alias, required: false, type: string } ]} ] + replace: + type: object + properties: + method: + type: string + example: POST + properties: + example: + [ + { name: ovPayToken, required: true, properties: [ + { name: newTokenId, required: false, type: integer }, + { name: tokenTypeId, required: false, type: integer }, + { name: alias, required: false, type: string }, + { name: serviceReferenceId, required: false, type: string }, + { name: amount, required: false, type: integer }, + ]} + ] - TokenProductInstancesResponse: + OvPayTokenProductInstancesResponse: type: object - required: - - Entries properties: - Entries: + productInstances: type: array + items: + type: object + properties: + productId: + type: integer + example: 1 From c04530e6163609e3da58245a454f515dc7c0562f Mon Sep 17 00:00:00 2001 From: Max Martens Date: Tue, 3 Dec 2024 15:40:40 +0100 Subject: [PATCH 05/19] Process comments --- src/openapi/customers/SE-customers.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index e85f1d7..bc50dab 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -45,7 +45,7 @@ paths: schema: type: string example: Doe - - name: emailAdress + - name: emailAddress in: query schema: type: string @@ -97,7 +97,7 @@ paths: schema: type: integer example: 0123456789 - - name: OvChipcardAlias + - name: ovChipcardAlias in: query schema: type: string @@ -171,7 +171,7 @@ paths: application/json: schema: $ref: '#/components/schemas/OvPayTokensResponse' - /customers/tokens/{tokenId}/product-instances: + /customers/tokens/{ovPayTokenId}/productInstances: get: tags: - ServiceEngine Customers @@ -181,7 +181,7 @@ paths: Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances. Where relevant, operations to be performed are returned as HATEOAS links per product-instance. parameters: - - name: tokenId + - name: ovPayTokenId in: path required: true style: simple @@ -243,7 +243,7 @@ components: type: string format: date example: '2023-02-01' - emailAdress: + emailAddress: type: string format: email example: 4j2dD@example.com @@ -266,7 +266,7 @@ components: example: 1 name: type: string - example: Brug + example: Home street: type: string example: Appelstraat @@ -316,7 +316,7 @@ components: example: 1 name: type: string - example: Mobiel + example: Home number: type: string example: "0123456789" @@ -392,7 +392,7 @@ components: { name: surname, required: false, type: string }, { name: suffix, required: false, type: string }, { name: dateOfBirth, required: false, type: string }, - { name: emailAdress, required: false, type: string }, + { name: emailAddress, required: false, type: string }, { name: addresses, required: false, multi: true, properties: [ { name: addressId, required: false, type: integer }, { name: isPreferred, required: false, type: boolean }, @@ -435,7 +435,7 @@ components: required: - ovPayTokens properties: - Entries: + ovPayTokens: type: array items: type: object @@ -507,12 +507,12 @@ components: method: type: string example: DELETE - product-instances: + productInstances: type: object properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/product-instances + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/productInstances method: type: string example: GET From a6878b9a341a10873611ba208e2b9cc9203b3f90 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Wed, 4 Dec 2024 16:03:10 +0100 Subject: [PATCH 06/19] WIP 3 --- src/openapi/customers/SE-customers.yaml | 70 ++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index bc50dab..f3d2c16 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -201,6 +201,29 @@ paths: summary: No product-instances found on token value: productInstances: [] + getSingleProductInstance: + summary: One product-instance found on token + value: + { + "productInstances": [ + { + "productId": 1, + "name": "HTM 90% Korting", + "status": "Active", + "fromInclusive": "2024-11-25T13:25:00+01:00", + "untilInclusive": "2024-12-25T03:59:59+01:00", + "productCategory": { + "productCategoryId": 1, + "name": "Kortingsabonnement" + }, + "gboTypeOfProduct": "discount", + "purchasedProductId": 1, + "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", + "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", + "contractId": "string" + } + ] + } components: schemas: CustomersResponse: @@ -402,7 +425,7 @@ components: { name: houseNumberSuffix, required: false, type: string }, { name: postalCode, required: false, type: string }, { name: city, required: false, type: string }, - { name: country, required: false, type: string } + { name: country, required: false, type: string } ]}, { name: phones, required: false, multi: true, properties: [ { name: phoneId, required: false, type: integer }, @@ -571,5 +594,50 @@ components: productId: type: integer example: 1 + name: + type: string + example: HTM 90% Korting + status: + type: string + example: Active + fromInclusive: + type: string + format: date-time-offset + example: "2024-11-25T13:25:00+01:00" + untilInclusive: + type: string + format: date-time-offset + description: >- + If not present, this product-instance represents a subscription/contract without a real end. If present, it can be either the natural end date or the refund timestamp. + example: "2024-12-25T03:59:59+01:00" + productCategory: + type: object + description: The category of the originating HTM product definition + properties: + productCategoryId: + type: integer + example: 1 + name: + type: string + example: Kortingsabonnement + gboTypeOfProduct: + type: string + example: discount + description: The type of the product instance as GBO defines it + purchasedProductId: + type: integer + example: 1 + orderId: + type: string + format: uuid + example: 501B17EF-36C4-4039-B92C-6517969B464E + orderLineId: + type: string + format: uuid + example: 38B17EF-36C4-4039-B92C-4817969B464E + contractId: + description: doen? of via purchasedProductId? + + From 7c666aa351bc8943400ac1aca99699db65e8c269 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Wed, 4 Dec 2024 17:40:58 +0100 Subject: [PATCH 07/19] RC1 --- src/openapi/customers/SE-customers.yaml | 109 +++++++++++++++--------- 1 file changed, 71 insertions(+), 38 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index f3d2c16..c396c34 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -4,9 +4,9 @@ info: description: >- Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. To be used by touchpoints to get information about HTM customers. - version: '1.0' + version: 'x.x' servers: - - url: https://api.integratielaag.nl/abt/serviceengine/customers/1.0 + - url: https://api.integratielaag.nl/abt/serviceengine/customers/x.x tags: - name: ServiceEngine Customers description: >- @@ -135,7 +135,7 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers", "apiErrorCode": "400.1", "title": "Niet gevonden", "detail": "Klant niet gevonden", @@ -152,7 +152,7 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers", "apiErrorCode": "409.1", "title": "Meer dan 1 klantprofiel gevonden", "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.", @@ -171,7 +171,7 @@ paths: application/json: schema: $ref: '#/components/schemas/OvPayTokensResponse' - /customers/tokens/{ovPayTokenId}/productInstances: + /customers/tokens/{ovPayTokenId}/productinstances: get: tags: - ServiceEngine Customers @@ -202,7 +202,7 @@ paths: value: productInstances: [] getSingleProductInstance: - summary: One product-instance found on token + summary: One non-renewable product-instance value: { "productInstances": [ @@ -210,17 +210,26 @@ paths: "productId": 1, "name": "HTM 90% Korting", "status": "Active", - "fromInclusive": "2024-11-25T13:25:00+01:00", - "untilInclusive": "2024-12-25T03:59:59+01:00", + "isRenewable": true, "productCategory": { "productCategoryId": 1, "name": "Kortingsabonnement" }, - "gboTypeOfProduct": "discount", - "purchasedProductId": 1, + "fromInclusive": "2024-11-25T13:25:00+01:00", + "untilInclusive": "2024-12-25T03:59:59+01:00", "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", - "contractId": "string" + "contractId": "56B17EF-C436-9043-B76C-481797WEB464F", + "_links": { + "get_order": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E", + "method": "GET" + }, + "get_contract": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F", + "method": "GET" + } + } } ] } @@ -316,7 +325,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/addresses/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1 method: type: string example: DELETE @@ -354,7 +363,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/phones/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1 method: type: string example: DELETE @@ -366,7 +375,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers method: type: string example: PATCH @@ -378,7 +387,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens method: type: string example: GET @@ -390,7 +399,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens method: type: string example: POST @@ -502,7 +511,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 method: type: string example: PATCH @@ -514,7 +523,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/replace + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/replace method: type: string example: POST @@ -526,7 +535,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 method: type: string example: DELETE @@ -535,7 +544,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/productInstances + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances method: type: string example: GET @@ -544,7 +553,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/trips + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/trips method: type: string example: GET @@ -599,17 +608,11 @@ components: example: HTM 90% Korting status: type: string + enum: [ "Active", "Ended", "Refunded" ] example: Active - fromInclusive: - type: string - format: date-time-offset - example: "2024-11-25T13:25:00+01:00" - untilInclusive: - type: string - format: date-time-offset - description: >- - If not present, this product-instance represents a subscription/contract without a real end. If present, it can be either the natural end date or the refund timestamp. - example: "2024-12-25T03:59:59+01:00" + isRenewable: + type: boolean + example: true productCategory: type: object description: The category of the originating HTM product definition @@ -620,13 +623,16 @@ components: name: type: string example: Kortingsabonnement - gboTypeOfProduct: + fromInclusive: type: string - example: discount - description: The type of the product instance as GBO defines it - purchasedProductId: - type: integer - example: 1 + format: date-time-offset + example: "2024-11-25T13:25:00+01:00" + untilInclusive: + type: string + format: date-time-offset + description: >- + If not present, this product-instance represents a subscription/contract without a real end date. If present, it can be either the natural end date or the refund timestamp. + example: "2024-12-25T03:59:59+01:00" orderId: type: string format: uuid @@ -636,7 +642,34 @@ components: format: uuid example: 38B17EF-36C4-4039-B92C-4817969B464E contractId: - description: doen? of via purchasedProductId? + type: string + format: uuid + example: 56B17EF-C436-9043-B76C-481797WEB464F + description: Only present for subscriptions/contracts + _links: + type: object + properties: + get_order: + type: object + properties: + href: + type: string + description: Always present for any HTM product-instance + example: https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E + method: + type: string + example: GET + get_contract: + type: object + properties: + href: + type: string + description: Only present for subscriptions/contracts + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F + method: + type: string + example: GET + From ee8cdfc660bd1d72c49d4cd648976bc0f547c215 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Thu, 5 Dec 2024 15:23:37 +0100 Subject: [PATCH 08/19] Remove _templates, add self under _links, add some new links and attributes --- src/openapi/customers/SE-customers.yaml | 207 +++++++++++------------- 1 file changed, 90 insertions(+), 117 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index c396c34..7238481 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -30,11 +30,21 @@ paths: schema: type: integer example: 1000001 + - name: customerStatusId + in: query + schema: + type: integer + example: 1 - name: debtorNumber in: query schema: type: integer example: 100001 + - name: debtorStatusId + in: query + schema: + type: integer + example: 1 - name: birthname in: query schema: @@ -221,6 +231,10 @@ paths: "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", "contractId": "56B17EF-C436-9043-B76C-481797WEB464F", "_links": { + "self": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances/1", + "method": "GET" + }, "get_order": { "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E", "method": "GET" @@ -244,9 +258,6 @@ components: customerNumber: type: integer example: 1000001 - debtorNumber: - type: string - example: DB100001 customerStatus: type: object properties: @@ -256,6 +267,18 @@ components: name: type: string example: Active + debtorNumber: + type: string + example: DB100001 + debtorStatus: + type: object + properties: + debtorStatusId: + type: integer + example: 1 + name: + type: string + example: Active person: type: object properties: @@ -320,7 +343,16 @@ components: _links: type: object properties: - delete: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1 + method: + type: string + example: GET + delete_address: type: object properties: href: @@ -358,7 +390,16 @@ components: _links: type: object properties: - delete: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1 + method: + type: string + example: GET + delete_phone: type: object properties: href: @@ -370,6 +411,25 @@ components: _links: type: object properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers + method: + type: string + example: GET + create_customer_status: + type: object + description: ONLY ALLOWED FOR SMP - Create a new customer status + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/statuses + method: + type: string + example: POST partial_edit: type: object properties: @@ -379,9 +439,6 @@ components: method: type: string example: PATCH - templated: - type: boolean - example: true get_tokens: type: object properties: @@ -391,9 +448,6 @@ components: method: type: string example: GET - templated: - type: boolean - example: true create_token: type: object properties: @@ -402,66 +456,7 @@ components: example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens method: type: string - example: POST - templated: - type: boolean - example: true - _templates: - type: object - properties: - partial_edit: - type: object - properties: - method: - type: string - example: PATCH - properties: - example: - [ - { name: person, required: true, properties: [ - { name: prefix, required: false, type: string }, - { name: birthname, required: false, type: string }, - { name: surname, required: false, type: string }, - { name: suffix, required: false, type: string }, - { name: dateOfBirth, required: false, type: string }, - { name: emailAddress, required: false, type: string }, - { name: addresses, required: false, multi: true, properties: [ - { name: addressId, required: false, type: integer }, - { name: isPreferred, required: false, type: boolean }, - { name: addressTypeId, required: false, type: integer }, - { name: street, required: false, type: string }, - { name: houseNumber, required: false, type: integer }, - { name: houseNumberSuffix, required: false, type: string }, - { name: postalCode, required: false, type: string }, - { name: city, required: false, type: string }, - { name: country, required: false, type: string } - ]}, - { name: phones, required: false, multi: true, properties: [ - { name: phoneId, required: false, type: integer }, - { name: isPreferred, required: false, type: boolean }, - { name: phoneTypeId, required: false, type: integer }, - { name: number, required: false, type: string }, - { name: countryCode, required: false, type: string } - ]} - ] } - ] - create_token: - type: object - properties: - method: - type: string - example: POST - properties: - example: - [ - { name: ovPayToken, required: true, properties: [ - { name: tokenTypeId, required: true, type: integer }, - { name: alias, required: true, type: string }, - { name: serviceReferenceId, required: false, type: string }, - { name: amount, required: false, type: integer }, - ]} - ] - + example: POST OvPayTokensResponse: type: object required: @@ -506,8 +501,18 @@ components: _links: type: object properties: - partial_edit: + self: type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 + method: + type: string + example: GET + partial_edit: + type: object + description: External touchpoints are only allowed to change alias - SMP can also change tokenStatus properties: href: type: string @@ -515,10 +520,7 @@ components: method: type: string example: PATCH - templated: - type: boolean - example: true - replace: + replace_token: type: object properties: href: @@ -527,10 +529,7 @@ components: method: type: string example: POST - templated: - type: boolean - example: true - delete: + delete_token: type: object properties: href: @@ -539,7 +538,7 @@ components: method: type: string example: DELETE - productInstances: + get_productinstances: type: object properties: href: @@ -548,7 +547,7 @@ components: method: type: string example: GET - trips: + get_trips: type: object properties: href: @@ -557,41 +556,6 @@ components: method: type: string example: GET - _templates: - type: object - properties: - partial_edit: - type: object - properties: - method: - type: string - example: PATCH - properties: - example: - [ - { name: ovPayToken, required: true, properties: [ - { name: alias, required: false, type: string } - ]} - ] - replace: - type: object - properties: - method: - type: string - example: POST - properties: - example: - [ - { name: ovPayToken, required: true, properties: [ - { name: newTokenId, required: false, type: integer }, - { name: tokenTypeId, required: false, type: integer }, - { name: alias, required: false, type: string }, - { name: serviceReferenceId, required: false, type: string }, - { name: amount, required: false, type: integer }, - ]} - ] - - OvPayTokenProductInstancesResponse: type: object properties: @@ -649,6 +613,15 @@ components: _links: type: object properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances + method: + type: string + example: GET get_order: type: object properties: From dbf8bff976a7de7fb2ba628e823d4f844a9079b1 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 20 Dec 2024 15:25:34 +0100 Subject: [PATCH 09/19] Tampermonkey plugin for adding a Swagger button to Gitea. --- src/plugins/gitea-add-swagger-button.user.js | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/plugins/gitea-add-swagger-button.user.js diff --git a/src/plugins/gitea-add-swagger-button.user.js b/src/plugins/gitea-add-swagger-button.user.js new file mode 100644 index 0000000..e57049c --- /dev/null +++ b/src/plugins/gitea-add-swagger-button.user.js @@ -0,0 +1,47 @@ +// ==UserScript== +// @name gitea-add-swagger-button +// @namespace https://integratielaag.nl/ +// @version 0.1 +// @description Creates a button in Gitea to view Swagger +// @author bboterm +// @match https://git.integratielaag.nl/*.yaml +// @icon https://www.google.com/s2/favicons?sz=64&domain=gitea.com +// @grant none +// ==/UserScript== + +(function() { + 'use strict'; + + // Set the base URL for the Swagger instance + const swaggerBaseURL = 'https://swagger.integratielaag.nl/?url='; + // Get the base URL from the current webpage + const gitBaseURL = window.location.origin; + + // Replace 'parent-class-name' with the class name of the parent div + const parentClassName = 'file-actions'; + // Replace 'child-class-name' with the class name of the child div + const childClassName = 'buttons'; + + const parentDiv = document.querySelector('div.file-actions'); + if (parentDiv) { + const childDiv = parentDiv.querySelector('div.buttons'); + if (childDiv) { + const firstATag = childDiv.querySelector('a'); + if (firstATag) { + // Get the URL of the raw file + const hrefValue = firstATag.getAttribute('href'); + // Create a string literal for the new Swagger button + const swaggerButton = `Swagger`; + // Add the Swagger button to the HTML + childDiv.innerHTML = swaggerButton + childDiv.innerHTML; + } else { + console.log('No tag found inside the child div.'); + } + } else { + console.log(`Child div with class '${childClassName}' not found.`); + } + } else { + console.log(`Parent div with class '${parentClassName}' not found.`); + } +})(); + From c595e257318bcffd8bc2dd57066b17c05d549283 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Mon, 23 Dec 2024 09:00:31 +0100 Subject: [PATCH 10/19] Added support for YAML and JSON files. --- src/plugins/gitea-add-swagger-button.user.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/gitea-add-swagger-button.user.js b/src/plugins/gitea-add-swagger-button.user.js index e57049c..e702cc3 100644 --- a/src/plugins/gitea-add-swagger-button.user.js +++ b/src/plugins/gitea-add-swagger-button.user.js @@ -1,13 +1,18 @@ // ==UserScript== // @name gitea-add-swagger-button // @namespace https://integratielaag.nl/ -// @version 0.1 +// @version 0.1.1 // @description Creates a button in Gitea to view Swagger // @author bboterm // @match https://git.integratielaag.nl/*.yaml +// @match https://git.integratielaag.nl/*.json // @icon https://www.google.com/s2/favicons?sz=64&domain=gitea.com // @grant none +// @updateURL https://git.integratielaag.nl/HTM/ovpay/raw/branch/develop/src/plugins/gitea-add-swagger-button.user.js +// @downloadURL https://git.integratielaag.nl/HTM/ovpay/raw/branch/develop/src/plugins/gitea-add-swagger-button.user.js // ==/UserScript== +// @history 0.1.0 Initial release +// @history 0.1.1 Added support for YAML and JSON files (function() { 'use strict'; From 233c7114b937f632d2da95b3c06c847d184c6af7 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 24 Dec 2024 09:35:30 +0100 Subject: [PATCH 11/19] OVPAY-879 - Minor fixes. --- src/openapi/fiko/fiko-crud.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index fe786a7..b51e1ad 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -197,8 +197,8 @@ paths: "occurredOn": "2024-10-04T00:00:00Z", "type": "debit", "productCode": "HTM-MND-20", - "aggregationReference": "FIKO-123456", - "accountingSystemReference": "U4F-123456", + "aggregationReference": null, + "accountingSystemReference": null, } responses: "201": From 8111b631f345b8d603bd6f78e6d5e8a8a2ca6244 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 24 Dec 2024 11:31:10 +0100 Subject: [PATCH 12/19] OVPAY-879 - Added schemas for Transactions v2. --- src/openapi/fiko/fiko-crud.yaml | 357 +++++++++++++++++++++----------- 1 file changed, 239 insertions(+), 118 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index b51e1ad..27dbd5b 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -130,48 +130,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionItems": - [ - { - "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", - }, - { - "transactionItemId": "e63cc37b-4d87-4278-8eb5-1477e07edf3d", - "sourceName": "Verkoopengine", - "transactionId": "1001237", - "transactionLineId": "1", - "name": "HTM Maandkorting 20%", - "quantity": 1, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "amountTax": 21, - "occurredOn": "2024-10-04T00:05:00Z", - "type": "debit", - "productCode": "HTM-MND-20", - "aggregationReference": "FIKO-123456", - "accountingSystemReference": "U4F-123456", - }, - ], - "href": null, - } + $ref: "#/components/schemas/TransactionItemsGetResponseBody" post: summary: Add a finanicial transaction item. description: Add a finanicial transaction item. @@ -182,33 +141,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "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": null, - "accountingSystemReference": null, - } + $ref: "#/components/schemas/TransactionItemsPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "transactionItemId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d" } + $ref: "#/components/schemas/TransactionItemsPostResponseBody" /transactionitems/bulk: post: summary: Add one ore more finanicial transaction items in bulk. @@ -220,58 +160,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - [ - { - "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": null, - "accountingSystemReference": null, - }, - { - "sourceName": "Verkoopengine", - "transactionId": "1001237", - "transactionLineId": "1", - "name": "HTM Maandkorting 20%", - "quantity": 1, - "taxCode": "V21", - "amountExclTax": 100, - "amountInclTax": 121, - "amountTax": 21, - "occurredOn": "2024-10-04T00:05:00Z", - "type": "debit", - "productCode": "HTM-MND-20", - "aggregationReference": null, - "accountingSystemReference": null, - }, - ] + $ref: "#/components/schemas/TransactionItemsBulkPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - [ - { - "transactionItemId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - }, - { - "transactionItemId": "e63cc37b-4d87-4278-8eb5-1477e07edf3d", - }, - ] + $ref: "#/components/schemas/TransactionItemsBulkPostResponseBody" /transactionitems/{transactionItemId}: parameters: - in: path @@ -292,21 +188,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "aggregationReference": "FIKO-123456", - "accountingSystemReference": "U4F-123456", - } + $ref: "#/components/schemas/TransactionItemsPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1" } + $ref: "#/components/schemas/TransactionItemsPatchResponseBody" /transactionitems/{transactionItemId}/processingfailures: parameters: - in: path @@ -2172,6 +2061,238 @@ components: schemas: unavailable: type: object + TransactionItemsGetResponseBody: + type: object + properties: + transactionItems: + type: "array" + items: + type: object + properties: + transactionItemId: + type: string + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + sourceName: + type: string + example: Verkoopengine + transactionId: + type: string + example: 1001236 + transactionLineId: + type: string + nullable: true + example: 1 + name: + type: string + example: HTM Maandkorting 20% + quantity: + type: integer + example: 1 + taxCode: + type: string + example: V21 + amountExclTax: + type: number + example: 100 + amountInclTax: + type: number + example: 121 + amountTax: + type: number + example: 21 + occurredOn: + type: string + format: date-time + example: 2024-10-04T00:00:00Z + type: + type: string + enum: + - debit + - credit + example: debit + productCode: + type: string + example: HTM-MND-20 + aggregationReference: + type: string + nullable: true + example: FIKO-123456 + accountingSystemReference: + type: string + nullable: true + example: U4F-123456 + required: + - transactionItemId + - sourceName + - transactionId + - name + - quantity + - taxCode + - amountExclTax + - amountInclTax + - amountTax + - occurredOn + - type + - productCode + href: + type: string + nullable: true + description: URI for pagination. + example: null + TransactionItemsPostRequestBody: + type: object + properties: + sourceName: + type: string + example: Verkoopengine + transactionId: + type: string + example: 1001236 + transactionLineId: + type: string + nullable: true + example: 1 + name: + type: string + example: HTM Maandkorting 20% + quantity: + type: integer + example: 1 + taxCode: + type: string + example: V21 + amountExclTax: + type: integer + example: 100 + amountInclTax: + type: integer + example: 121 + amountTax: + type: integer + example: 21 + occurredOn: + type: string + format: date-time + example: 2024-10-04T00:00:00Z + type: + type: string + enum: + - debit + - credit + example: debit + productCode: + type: string + example: HTM-MND-20 + required: + - sourceName + - transactionId + - name + - quantity + - taxCode + - amountExclTax + - amountInclTax + - amountTax + - occurredOn + - type + - productCode + TransactionItemsPostResponseBody: + type: object + properties: + transactionItemId: + type: string + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + required: + - transactionItemId + TransactionItemsBulkPostRequestBody: + type: object + properties: + transactionItems: + type: array + items: + type: object + properties: + sourceName: + type: string + example: Verkoopengine + transactionId: + type: string + example: 1001236 + transactionLineId: + type: string + nullable: true + example: 1 + name: + type: string + example: HTM Maandkorting 20% + quantity: + type: integer + example: 1 + taxCode: + type: string + example: V21 + amountExclTax: + type: integer + example: 100 + amountInclTax: + type: integer + example: 121 + amountTax: + type: integer + example: 21 + occurredOn: + type: string + format: date-time + example: 2024-10-04T00:00:00Z + type: + type: string + enum: + - debit + - credit + example: debit + productCode: + type: string + example: HTM-MND-20 + required: + - sourceName + - transactionId + - name + - quantity + - taxCode + - amountExclTax + - amountInclTax + - amountTax + - occurredOn + - type + - productCode + TransactionItemsBulkPostResponseBody: + type: array + items: + type: object + properties: + transactionItemId: + type: string + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + required: + - transactionItemId + TransactionItemsPatchRequestBody: + type: object + properties: + aggregationReference: + type: string + nullable: true + example: FIKO-123456 + accountingSystemReference: + type: string + nullable: true + example: U4F-123456 + TransactionItemsPatchResponseBody: + type: object + properties: + transactionItemId: + type: string + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + required: + - transactionItemId rfc9457: type: object properties: From 4ed63a75bfc150885fe584c638b9dbb94a55215d Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 24 Dec 2024 13:27:22 +0100 Subject: [PATCH 13/19] OVPAY-879 - Added schemas for Failures v2. --- src/openapi/fiko/fiko-crud.yaml | 462 ++++++++++++++++++++++---------- 1 file changed, 316 insertions(+), 146 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 27dbd5b..887bb4e 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -216,43 +216,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "department": "900", - "costCenter": "84955", - "costType": "619031", - "documentDate": "2022-01-01", - "documentCode": "VERK_FACTUUR", - "accountingPeriod": "2024/10", - "transactionDescription": "Dagkaart", - "contraAccountNumber": "220.10419", - "status": "open", - "occurence": 1, - "processingFailureInstances": - [ - { - "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", - "processingFailureId": "c93a5b6a-5b6a-4b0a-9c9e-4b0a5b6a4b0a", - "timestamp": "2022-01-01 00:00:00", - "failureReason": "122be602-139d-49f5-b34f-1e3e2de29408", - "element": "costCenter", - "occurence": 1, - "change": "Adapt config", - }, - ], - } + $ref: "#/components/schemas/ProcessingFailuresPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - } + $ref: "#/components/schemas/ProcessingFailuresPostResponseBody" /transactionitems/{transactionItemId}/transactionaudittrails: parameters: - in: path @@ -482,45 +453,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailures": - [ - { - "processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - "transactionItemId": "000dd413-2d19-47c0-a9db-9efbb6bc39a2", - "department": "900", - "costCenter": "84955", - "costType": "619031", - "documentDate": "2022-01-01", - "documentCode": "VERK_FACTUUR", - "accountingPeriod": "2024/10", - "transactionDescription": "Dagkaart", - "contraAccountNumber": "220.10419", - "status": "open", - "occurence": 1, - "processingFailureInstances": - [ - { - "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", - "processingFailureId": "c93a5b6a-5b6a-4b0a-9c9e-4b0a5b6a4b0a", - "timestamp": "2022-01-01 00:00:00", - "failureReason": - { - "failureReasonId": 12, - "reasonCode": "1234ABCD", - "reasonDesc": "description", - }, - "element": "costCenter", - "occurence": 1, - "change": "Adapt config", - }, - ], - }, - ], - "href": null, - } + $ref: "#/components/schemas/ProcessingFailuresGetResponseBody" /processingfailures/{processingFailureId}: parameters: - in: path @@ -540,19 +473,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: { "status": "open", "occurence": 2 } + $ref: "#/components/schemas/ProcessingFailuresPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ProcessingFailuresPatchResponseBody" /processingfailures/{processingFailureId}/processingfailureinstances: parameters: - in: path @@ -572,26 +500,14 @@ paths: 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", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureInstanceId": "9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPostResponseBody" /processingfailureinstances/{processingFailureInstanceId}: parameters: - in: path @@ -611,24 +527,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "timestamp": "2022-01-01 00:00:00", - "occurence": 2, - "change": "Adapt config", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "processingFailureInstanceId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ProcessingFailureInstancesPatchResponseBody" /productmetadata: get: summary: Find product metadata. @@ -2064,60 +1970,60 @@ components: TransactionItemsGetResponseBody: type: object properties: - transactionItems: - type: "array" + transactionItems: + type: array items: type: object properties: - transactionItemId: + transactionItemId: type: string example: afce35b2-1dff-4ace-98d0-4b9ac405c87d - sourceName: + sourceName: type: string example: Verkoopengine - transactionId: + transactionId: type: string example: 1001236 - transactionLineId: + transactionLineId: type: string nullable: true example: 1 - name: + name: type: string example: HTM Maandkorting 20% - quantity: + quantity: type: integer example: 1 - taxCode: + taxCode: type: string example: V21 - amountExclTax: - type: number + amountExclTax: + type: integer example: 100 - amountInclTax: - type: number + amountInclTax: + type: integer example: 121 - amountTax: - type: number + amountTax: + type: integer example: 21 - occurredOn: + occurredOn: type: string format: date-time example: 2024-10-04T00:00:00Z - type: + type: type: string enum: - debit - credit example: debit - productCode: + productCode: type: string example: HTM-MND-20 - aggregationReference: + aggregationReference: type: string nullable: true example: FIKO-123456 - accountingSystemReference: + accountingSystemReference: type: string nullable: true example: U4F-123456 @@ -2142,45 +2048,45 @@ components: TransactionItemsPostRequestBody: type: object properties: - sourceName: + sourceName: type: string example: Verkoopengine - transactionId: + transactionId: type: string example: 1001236 - transactionLineId: + transactionLineId: type: string nullable: true example: 1 - name: + name: type: string example: HTM Maandkorting 20% - quantity: + quantity: type: integer example: 1 - taxCode: + taxCode: type: string example: V21 - amountExclTax: + amountExclTax: type: integer example: 100 - amountInclTax: + amountInclTax: type: integer example: 121 - amountTax: + amountTax: type: integer example: 21 - occurredOn: + occurredOn: type: string format: date-time example: 2024-10-04T00:00:00Z - type: + type: type: string enum: - debit - credit example: debit - productCode: + productCode: type: string example: HTM-MND-20 required: @@ -2211,45 +2117,45 @@ components: items: type: object properties: - sourceName: + sourceName: type: string example: Verkoopengine - transactionId: + transactionId: type: string example: 1001236 - transactionLineId: + transactionLineId: type: string nullable: true example: 1 - name: + name: type: string example: HTM Maandkorting 20% - quantity: + quantity: type: integer example: 1 - taxCode: + taxCode: type: string example: V21 - amountExclTax: + amountExclTax: type: integer example: 100 - amountInclTax: + amountInclTax: type: integer example: 121 amountTax: type: integer example: 21 - occurredOn: + occurredOn: type: string format: date-time example: 2024-10-04T00:00:00Z - type: + type: type: string enum: - debit - credit example: debit - productCode: + productCode: type: string example: HTM-MND-20 required: @@ -2293,6 +2199,270 @@ components: example: afce35b2-1dff-4ace-98d0-4b9ac405c87d required: - transactionItemId + ProcessingFailuresPostRequestBody: + type: object + properties: + department: + type: string + nullable: true + example: 900 + costCenter: + type: string + nullable: true + example: 84955 + costType: + type: string + nullable: true + example: 619031 + documentDate: + type: string + format: date + nullable: true + example: 2022-01-01 + documentCode: + type: string + nullable: true + example: VERK_FACTUUR + accountingPeriod: + type: string + nullable: true + example: 2024/10 + transactionDescription: + type: string + nullable: true + example: Dagkaart + contraAccountNumber: + type: string + nullable: true + example: 220.10419 + status: + type: string + enum: + - open + - returned to trx-db + - returned to src + example: open + occurence: + type: integer + example: 1 + processingFailureInstances: + type: array + items: + $ref: "#/components/schemas/ProcessingFailureInstancesPostRequestBody" + required: + - status + - occurence + - processingFailureInstances + ProcessingFailuresPostResponseBody: + type: object + properties: + processingFailureId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureId + ProcessingFailuresGetResponseBody: + type: object + properties: + processingFailures: + type: array + items: + type: object + properties: + processingFailureId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + transactionItemId: + type: string + format: uuid + example: 2d77d978-7141-499a-84ad-93fad8ee03ce + department: + type: string + nullable: true + example: 900 + costCenter: + type: string + nullable: true + example: 84955 + costType: + type: string + nullable: true + example: 619031 + documentDate: + type: string + format: date + nullable: true + example: 2022-01-01 + documentCode: + type: string + nullable: true + example: VERK_FACTUUR + accountingPeriod: + type: string + nullable: true + example: 2024/10 + transactionDescription: + type: string + nullable: true + example: Dagkaart + contraAccountNumber: + type: string + nullable: true + example: 220.10419 + status: + type: string + enum: + - open + - returned to trx-db + - returned to src + example: open + occurence: + type: integer + example: 1 + processingFailureInstances: + type: array + items: + type: object + properties: + processingFailureInstanceId: + type: string + format: uuid + example: 9afa9a6b-5b6a-4b0a-9c9e-4b0a5b6a4b0a + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + failureReason: + type: object + properties: + failureReasonId: + type: integer + example: 1 + reasonCode: + type: string + example: 002 + reasonDesc: + type: string + example: Contra account does not exist + required: + - failureReasonId + - reasonCode + - reasonDesc + element: + type: string + example: costCenter + occurence: + type: integer + example: 1 + change: + type: string + nullable: true + example: Adapt config + required: + - processingFailureInstanceId + - timestamp + - failureReason + - element + - occurence + required: + - processingFailureId + - transactionItemId + - status + - occurence + - processingFailureInstances + href: + type: string + nullable: true + description: URI for pagination. + example: null + ProcessingFailuresPatchRequestBody: + type: object + properties: + status: + type: string + enum: + - open + - returned to trx-db + - returned to src + nullable: true + example: returned to trx-db + occurence: + type: integer + nullable: true + example: 2 + ProcessingFailuresPatchResponseBody: + type: object + properties: + processingFailureId: + type: string + format: uuid + nullable: false + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureId + ProcessingFailureInstancesPostRequestBody: + type: object + properties: + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + failureReasonId: + type: integer + example: 1 + element: + type: string + example: costCenter + occurence: + type: integer + example: 1 + change: + type: string + nullable: true + example: Adapt config + required: + - timestamp + - failureReason + - element + - occurence + ProcessingFailureInstancesPostResponseBody: + type: object + properties: + processingFailureInstanceId: + type: string + format: uuid + nullable: false + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureInstanceId + ProcessingFailureInstancesPatchRequestBody: + type: object + properties: + timestamp: + type: string + format: date-time + nullable: true + example: 2022-01-01 00:00:00 + occurence: + type: integer + nullable: true + example: 1 + change: + type: string + nullable: true + example: Adapt config + ProcessingFailureInstancesPatchResponseBody: + type: object + properties: + processingFailureInstanceId: + type: string + format: uuid + nullable: false + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - processingFailureInstanceId rfc9457: type: object properties: From 2515f36afa9af914da667b6dee60532290ec1418 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 24 Dec 2024 14:36:29 +0100 Subject: [PATCH 14/19] OVPAY-879 - Audit Trail v2 overhaul. --- src/openapi/fiko/fiko-crud.yaml | 643 ++++++++++++++------------------ 1 file changed, 285 insertions(+), 358 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 887bb4e..8a4a360 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -244,26 +244,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "user": "fiko", - "timestamp": "2022-01-01 00:00:00", - "action": "created", - "description": "Transaction created.", - "correlationId": "a3891560-3084-42cb-867c-f289e7cda47d", - } + $ref: "#/components/schemas/TransactionAuditTrailsPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionAuditTrailId": "afce35b2-1dff-4ace-98d0-4b9ac405c87d", - } + $ref: "#/components/schemas/TransactionAuditTrailsPostResponseBody" /transactionaudittrails: get: summary: Find audit trail entries. @@ -330,32 +318,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "transactionAuditTrails": - [ - { - "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", - }, - { - "transactionAuditTrailId": "e63cc37b-4d87-4278-8eb5-1477e07edf3d", - "transactionItemId": "d667d293-aa82-4c9e-9b10-77cffc9058a1", - "user": "fiko", - "timestamp": "2022-01-01 00:01:00", - "action": "processed", - "description": "Transaction processed.", - "correlationId": "3e9d7d4b-8adf-4e7f-8251-be308f16d3de", - }, - ], - "href": null, - } + $ref: "#/components/schemas/TransactionAuditTrailsGetResponseBody" /processingfailures: get: summary: Find processing failures. @@ -881,48 +844,6 @@ paths: { "productContraAccountId": "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/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 - content: - application/json: - schema: - $ref: "#/components/schemas/postMetadataAuditTrailResponse" /contraaccountmetadata: get: summary: Find contra account metadata. @@ -1044,48 +965,6 @@ 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/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 - content: - application/json: - schema: - $ref: "#/components/schemas/postMetadataAuditTrailResponse" /taxmetadata: get: summary: Find tax metadata. @@ -1229,48 +1108,6 @@ 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/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 - content: - application/json: - schema: - $ref: "#/components/schemas/postMetadataAuditTrailResponse" /sourcemetadata: get: summary: Find source metadata. @@ -1427,48 +1264,6 @@ 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/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 - content: - application/json: - schema: - $ref: "#/components/schemas/postMetadataAuditTrailResponse" /accountingperiodmetadata: get: summary: Find accounting period metadata. @@ -1575,48 +1370,6 @@ 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/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 - content: - application/json: - schema: - $ref: "#/components/schemas/postMetadataAuditTrailResponse" /concessionmetadata: get: summary: Find concession metadata. @@ -1748,48 +1501,6 @@ 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/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 - content: - application/json: - schema: - $ref: "#/components/schemas/postMetadataAuditTrailResponse" /metadataaudittrails: get: summary: Find metadata audit trails. @@ -1805,106 +1516,103 @@ paths: example: 37a8095b-19db-498f-9349-5f37d21c5bdf description: The id of the metadata audit trail. - in: query - name: productMetadataId + name: source schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the product metadata. + example: FMT + description: The source of the metadata change. - in: query - name: concessionMetadataId + name: endpoint schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the concession metadata. + format: url + example: https://dev.api.htm.nl/v2/productmetadata + description: The endpoint of the metadata change. - in: query - name: contraAccountMetadataId + name: operation schema: - type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the contra account metadata. + type: array + items: + type: string + enum: + - GET + - POST + - PATCH + - DELETE + example: POST + explode: false + description: The operation of the metadata change. - in: query - name: taxMetadataId + name: responseCode schema: - type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the tax metadata. + type: integer + example: 200 + description: The HTTP response code of the metadata change. - in: query - name: sourceMetadataId + name: requestBody schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the source metadata. + format: json + example: { "json": "data" } + description: The request body of the metadata change. - in: query - name: accountingPeriodMetadataId + name: responseBody schema: type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf - description: The id of the accounting period metadata. + format: json + example: { "json": "data" } + description: The response body of the metadata change. - in: query name: user schema: type: string - example: rmeeuws - description: The username of the user. + example: r.meeuws + description: The id of the user who performed the metadata change. - in: query name: timestampBefore schema: type: string - example: 2022-01-01 00:00:00 - description: The timestamp before the event occured. + format: date-time + example: 2024-01-01T00:00:00.000 + description: The timestamp before the metadata change was made. - in: query name: timestampAfter schema: type: string - example: 2022-01-01 00:00:00 - description: The timestamp after the event occured. + format: date-time + example: 2024-01-01T00:00:00.000 + description: The timestamp after the metadata change was made. - in: query name: correlationId schema: type: string - example: a3891560-3084-42cb-867c-f289e7cda47d - description: The correlation id of the event. + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The correlation id of the metadata change. responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "metadataAuditTrails": - [ - { - "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", - }, - ], - }, - ], - "href": null, - } + $ref: "#/components/schemas/MetadataAuditTrailsGetResponseBody" + 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/MetadataAuditTrailsPostRequestBody" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/MetadataAuditTrailsPostResponseBody" /concessions: get: summary: Get all concessions. @@ -2106,6 +1814,7 @@ components: properties: transactionItemId: type: string + format: uuid example: afce35b2-1dff-4ace-98d0-4b9ac405c87d required: - transactionItemId @@ -2177,6 +1886,7 @@ components: properties: transactionItemId: type: string + format: uuid example: afce35b2-1dff-4ace-98d0-4b9ac405c87d required: - transactionItemId @@ -2196,6 +1906,7 @@ components: properties: transactionItemId: type: string + format: uuid example: afce35b2-1dff-4ace-98d0-4b9ac405c87d required: - transactionItemId @@ -2398,7 +2109,6 @@ components: processingFailureId: type: string format: uuid - nullable: false example: 37a8095b-19db-498f-9349-5f37d21c5bdf required: - processingFailureId @@ -2433,7 +2143,6 @@ components: processingFailureInstanceId: type: string format: uuid - nullable: false example: 37a8095b-19db-498f-9349-5f37d21c5bdf required: - processingFailureInstanceId @@ -2459,10 +2168,228 @@ components: processingFailureInstanceId: type: string format: uuid - nullable: false example: 37a8095b-19db-498f-9349-5f37d21c5bdf required: - processingFailureInstanceId + TransactionAuditTrailsPostRequestBody: + type: object + properties: + user: + type: string + example: fiko + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + action: + type: string + enum: + - created + - succeeded + - failed + - returned to trx-db + - returned to src + example: created + description: + type: string + nullable: true + example: Transaction created. + correlationId: + type: string + format: uuid + nullable: true + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - user + - timestamp + - action + TransactionAuditTrailsPostResponseBody: + type: object + properties: + transactionAuditTrailId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - transactionAuditTrailId + TransactionAuditTrailsGetResponseBody: + type: object + properties: + transactionAuditTrails: + type: array + items: + type: object + properties: + transactionAuditTrailId: + type: string + format: uuid + example: afce35b2-1dff-4ace-98d0-4b9ac405c87d + transactionItemId: + type: string + format: uuid + example: d667d293-aa82-4c9e-9b10-77cffc9058a1 + user: + type: string + example: fiko + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + action: + type: string + enum: + - created + - succeeded + - failed + - returned to trx-db + - returned to src + example: created + description: + type: string + nullable: true + example: Transaction created. + correlationId: + type: string + format: uuid + nullable: true + example: a3891560-3084-42cb-867c-f289e7cda47d + required: + - transactionAuditTrailId + - transactionItemId + - user + - timestamp + - action + href: + type: string + nullable: true + example: null + required: + - transactionAuditTrails + MetadataAuditTrailsGetResponseBody: + type: object + properties: + metadataAuditTrails: + type: array + items: + type: object + properties: + metadataAuditTrailId: + type: string + format: uuid + example: b6161270-eb08-4242-90ec-967d5db62070 + source: + type: string + example: FMT + endpoint: + type: string + format: url + example: https://dev.api.htm.nl/v2/productmetadata + operation: + type: string + enum: + - GET + - POST + - PATCH + - DELETE + example: POST + requestBody: + type: string + format: json + example: { "json": "data" } + responseCode: + type: integer + example: 200 + responseBody: + type: string + format: json + example: { "json": "data" } + user: + type: string + example: r.meeuws + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + correlationId: + type: string + format: uuid + nullable: true + example: 662de47c-d809-41bd-b3f6-5c7e1dc5c030 + required: + - metadataAuditTrailId + - source + - endpoint + - operation + - requestBody + - responseCode + - responseBody + - user + - timestamp + href: + type: string + nullable: true + example: null + required: + - metadataAuditTrails + MetadataAuditTrailsPostRequestBody: + type: object + properties: + source: + type: string + example: FMT + endpoint: + type: string + format: url + example: https://dev.api.htm.nl/v2/productmetadata + operation: + type: string + enum: + - GET + - POST + - PATCH + - DELETE + example: POST + requestBody: + type: string + format: json + example: { "json": "data" } + responseCode: + type: integer + example: 200 + responseBody: + type: string + format: json + example: { "json": "data" } + user: + type: string + example: r.meeuws + timestamp: + type: string + format: date-time + example: 2022-01-01 00:00:00 + correlationId: + type: string + format: uuid + nullable: true + example: 662de47c-d809-41bd-b3f6-5c7e1dc5c030 + required: + - source + - endpoint + - operation + - requestBody + - responseCode + - responseBody + - user + - timestamp + MetadataAuditTrailsPostResponseBody: + type: object + properties: + metadataAuditTrailId: + type: string + format: uuid + example: b6161270-eb08-4242-90ec-967d5db62070 + required: + - metadataAuditTrailId rfc9457: type: object properties: From 520362ae4de5058771921a76872224dc390b7e0b Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Fri, 3 Jan 2025 16:07:43 +0100 Subject: [PATCH 15/19] OVPAY-879 - Metadata v2 overhaul. --- src/openapi/fiko/fiko-crud.yaml | 1380 +++++++++++++++++++++---------- 1 file changed, 948 insertions(+), 432 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 8a4a360..94d7930 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -595,81 +595,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "productMetadata": - [ - { - "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", - "productCode": "4031", - "department": "900", - "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", - "contraAccountCode": "123456", - "contraAccountNumber": "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, - }, - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - { - "contraAccountMetadata": - { - "contraAccountMetadataId": "69c562ca-5299-4585-ac92-46fb54aeb99e", - "contraAccountCode": "123456", - "contraAccountNumber": "220.10419", - "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, - }, - ], - }, - ], - "href": null, - } + $ref: "#/components/schemas/ProductMetadataGetResponseBody" + post: summary: Add product metadata. description: Add product metadata. @@ -680,47 +607,14 @@ paths: 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, - "productContraAccounts": - [ - { - "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", - "concessionId": 1, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - { - "contraAccountMetadataId": "02e458ce-f77a-4262-8b38-490e54f52856", - "concessionId": 2, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - ], - } + $ref: "#/components/schemas/ProductMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + $ref: "#/components/schemas/ProductMetadataPostResponseBody" /productmetadata/{productMetadataId}: parameters: - in: path @@ -741,27 +635,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "productCode": "4031", - "department": "900", - "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, - } + $ref: "#/components/schemas/ProductMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "productMetadataId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61" } + $ref: "#/components/schemas/ProductMetadataPatchResponseBody" /productmetadata/{productMetadataId}/productcontraaccounts: parameters: - in: path @@ -782,27 +663,77 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", - "concessionId": 1, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ProductContraAccountsPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "productContraAccountId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", - } + $ref: "#/components/schemas/ProductContraAccountsPostResponseBody" + /productcontraaccounts: + get: + summary: Find product contra accounts. + description: Find product contra accounts. + tags: + - Metadata v2 + parameters: + - in: query + name: productContraAccountId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the product contra account. + - 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: contraAccountMetadataId + schema: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + description: The id of the contra account metadata. + - in: query + name: concessionId + schema: + type: array + items: + type: integer + example: [1, 2] + explode: false + 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. + - in: query + name: costCenter + schema: + type: string + example: 84955 + description: Find product metadata that is linked to this cost center. + - in: query + name: validAt + schema: + type: string + example: 2024-03-22T09:00:00 + description: Timestamp that the metadata is valid. + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/ProductContraAccountsGetResponseBody" /productcontraaccounts/{productContraAccountId}: parameters: - in: path @@ -823,27 +754,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "e0af8c8f-d421-4567-a14e-48e2a1bb86fb", - "concessionId": 1, - "sourceMetadataId": "08d96f94-f468-467e-9068-c86c34f43097", - "costCenter": "84955", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ProductContraAccountsPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "productContraAccountId": "39a87c2a-9011-4dfd-b35e-1245a98c2e61", - } + $ref: "#/components/schemas/ProductContraAccountsPatchResponseBody" /contraaccountmetadata: get: summary: Find contra account metadata. @@ -883,21 +801,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadata": - [ - { - "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - "contraAccountCode": "123456", - "contraAccountNumber": "220.10419", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - }, - ], - "href": null, - } + $ref: "#/components/schemas/ContraAccountMetadataGetResponseBody" post: summary: Add contra account metadata. description: Add contra account metadata. @@ -908,25 +812,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountCode": "123456", - "contraAccountNumber": "220.10419", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ContraAccountMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ContraAccountMetadataPostResponseBody" /contraaccountmetadata/{contraAccountMetadataId}: parameters: - in: path @@ -947,24 +840,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountNumber": "220.10419", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/ContraAccountMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "contraAccountMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ContraAccountMetadataPatchResponseBody" /taxmetadata: get: summary: Find tax metadata. @@ -1010,38 +893,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "taxMetadata": - [ - { - "taxMetadataId": "bc4ea24a-27a5-40e8-bbbc-57a105afaaa0", - "taxCode": "V21", - "taxPercentageAmount": 21, - "description": "BTW VERKOOP HOOG 21%", - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - }, - { - "taxMetadataId": "73c47af3-7c8b-44d3-b599-9b6f5a587a82", - "taxCode": "V09", - "taxPercentageAmount": 9, - "description": "BTW VERKOOP LAAG 9%", - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - }, - { - "taxMetadataId": "423b879c-e8db-4ba2-a2b4-0adfe037043d", - "taxCode": "V0", - "taxPercentageAmount": 0, - "description": "BTW VERKOOP NUL", - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - }, - ], - "href": null, - } + $ref: "#/components/schemas/TaxMetadataGetResponseBody" post: summary: Add tax metadata. description: Add tax metadata. @@ -1052,24 +904,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "taxCode": "V21", - "taxPercentageAmount": 21, - "description": "BTW VERKOOP HOOG 21%", - "validFrom": "2024-03-22T09:00:00", - "validUntil": null, - } + $ref: "#/components/schemas/TaxMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + $ref: "#/components/schemas/TaxMetadataPostResponseBody" /taxmetadata/{taxMetadataId}: parameters: - in: path @@ -1090,24 +932,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "taxCode": "V21", - "taxPercentageAmount": 21, - "description": "BTW VERKOOP HOOG 21%", - "validFrom": "2024-03-22T09:00:00", - "validUntil": "2025-12-31T23:59:59", - } + $ref: "#/components/schemas/TaxMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "taxMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + $ref: "#/components/schemas/TaxMetadataPatchResponseBody" /sourcemetadata: get: summary: Find source metadata. @@ -1173,25 +1005,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "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, - }, - ], - "href": null, - } + $ref: "#/components/schemas/SourceMetadataGetResponseBody" post: summary: Add source metadata. description: Add source metadata. @@ -1202,27 +1016,14 @@ paths: 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, - } + $ref: "#/components/schemas/SourceMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + $ref: "#/components/schemas/SourceMetadataPostResponseBody" /sourcemetadata/{sourceMetadataId}: parameters: - in: path @@ -1243,27 +1044,14 @@ paths: 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, - } + $ref: "#/components/schemas/SourceMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { "sourceMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf" } + $ref: "#/components/schemas/SourceMetadataPatchResponseBody" /accountingperiodmetadata: get: summary: Find accounting period metadata. @@ -1296,24 +1084,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "accountingPeriodMetadata": - [ - { - "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - "accountingPeriod": "2024-01", - "isOpen": false, - }, - { - "accountingPeriodMetadataId": "0302c651-f040-4cbc-8a4d-90dc82f29a32", - "accountingPeriod": "2024-02", - "isOpen": true, - }, - ], - "href": null, - } + $ref: "#/components/schemas/AccountingPeriodMetadataGetResponseBody" post: summary: Add accounting period metadata. description: Add accounting period metadata. @@ -1324,19 +1095,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: { "accountingPeriod": "2024-01", "isOpen": true } + $ref: "#/components/schemas/AccountingPeriodMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/AccountingPeriodMetadataPostResponseBody" /accountingperiodmetadata/{accountingPeriodMetadataId}: parameters: - in: path @@ -1357,19 +1123,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: { "accountingPeriod": "2024-01", "isOpen": true } + $ref: "#/components/schemas/AccountingPeriodMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "accountingPeriodMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/AccountingPeriodMetadataPatchResponseBody" /concessionmetadata: get: summary: Find concession metadata. @@ -1411,28 +1172,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionMetadata": - [ - { - "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, - }, - ], - "href": null, - } + $ref: "#/components/schemas/ConcessionMetadataGetResponseBody" post: summary: Add concession metadata. description: Add concession metadata. @@ -1443,25 +1183,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionId": 2, - "percentage": 15.979, - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - } + $ref: "#/components/schemas/ConcessionMetadataPostRequestBody" responses: "201": description: Created content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ConcessionMetadataPostResponseBody" /concessionmetadata/{concessionMetadataId}: parameters: - in: path @@ -1482,25 +1211,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionId": 2, - "percentage": 15.979, - "validFrom": "2024-01-01T00:00:00.000", - "validUntil": null, - } + $ref: "#/components/schemas/ConcessionMetadataPatchRequestBody" responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessionMetadataId": "37a8095b-19db-498f-9349-5f37d21c5bdf", - } + $ref: "#/components/schemas/ConcessionMetadataPatchResponseBody" /metadataaudittrails: get: summary: Find metadata audit trails. @@ -1596,7 +1314,7 @@ paths: schema: $ref: "#/components/schemas/MetadataAuditTrailsGetResponseBody" post: - summary: Add metadata audit trail. + summary: Add metadata audit trail. description: Add metadata audit trail. tags: - Audit Trail v2 @@ -1625,17 +1343,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "concessions": - [ - { "concessionId": 1, "name": "rail" }, - { "concessionId": 2, "name": "bus" }, - { "concessionId": 3, "name": "not_applicable" }, - ], - "href": null, - } + $ref: "#/components/schemas/ConcessionsGetResponseBody" /failurereasons: get: summary: Get all failure reasons. @@ -1648,24 +1356,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/unavailable" - example: - { - "failureReasons": - [ - { - "failureReasonId": 1, - "reasonCode": "002", - "reasonDesc": "Contra account does not exist", - }, - { - "failureReasonId": 2, - "reasonCode": "003", - "reasonDesc": "Accouting period closed", - }, - ], - "href": null, - } + $ref: "#/components/schemas/FailureReasonsGetResponseBody" components: securitySchemes: bearerToken: @@ -2046,21 +1737,7 @@ components: format: date-time example: 2022-01-01 00:00:00 failureReason: - type: object - properties: - failureReasonId: - type: integer - example: 1 - reasonCode: - type: string - example: 002 - reasonDesc: - type: string - example: Contra account does not exist - required: - - failureReasonId - - reasonCode - - reasonDesc + $ref: "#/components/schemas/FailureReason" element: type: string example: costCenter @@ -2390,6 +2067,852 @@ components: example: b6161270-eb08-4242-90ec-967d5db62070 required: - metadataAuditTrailId + ProductMetadataGetResponseBody: + type: object + properties: + productMetadata: + type: array + items: + type: object + properties: + productMetadataId: + type: string + format: uuid + example: 39a87c2a-9011-4dfd-b35e-1245a98c2e61 + productCode: + type: string + example: 4031 + department: + type: string + example: 900 + costType: + type: string + example: 619031 + description: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + documentCode: + type: string + example: VERK_FACTUUR + timestampUpdated: + type: string + format: date-time + example: 2022-01-01T00:00:00 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + productContraAccounts: + type: array + items: + type: object + properties: + contraAccountMetadata: + $ref: "#/components/schemas/ContraAccountMetadata" + concession: + $ref: "#/components/schemas/Concession" + sourceMetadata: + $ref: "#/components/schemas/SourceMetadata" + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountMetadata + - concession + - sourceMetadata + - costCenter + - validFrom + required: + - productMetadataId + - productCode + - department + - costType + - description + - documentCode + - timestampUpdated + - validFrom + - productContraAccounts + href: + type: string + nullable: true + description: URI for pagination. + example: null + ProductMetadataPostRequestBody: + type: object + properties: + productCode: + type: string + example: 4031 + department: + type: string + example: 900 + costType: + type: string + example: 619031 + description: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + documentCode: + type: string + example: VERK_FACTUUR + timestampUpdated: + type: string + format: date-time + example: 2022-01-01T00:00:00 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - productCode + - department + - costType + - description + - documentCode + - timestampUpdated + - validFrom + ProductMetadataPostResponseBody: + type: object + properties: + productMetadataId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productMetadataId + ProductMetadataPatchRequestBody: + type: object + properties: + productCode: + type: string + example: 4031 + department: + type: string + example: 900 + costType: + type: string + example: 619031 + description: + type: string + example: O4031_Reisproduct HTM 1 dag Anoniem + documentCode: + type: string + example: VERK_FACTUUR + timestampUpdated: + type: string + format: date-time + example: 2022-01-01T00:00:00 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: 2024-06-22T09:00:00 + ProductMetadataPatchResponseBody: + type: object + properties: + productMetadataId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productMetadataId + ProductContraAccountsPostRequestBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + concessionId: + type: integer + example: 1 + sourceMetadataId: + type: string + format: uuid + example: 08d96f94-f468-467e-9068-c86c34f43097 + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountMetadataId + - concessionId + - sourceMetadataId + - costCenter + - validFrom + ProductContraAccountsPostResponseBody: + type: object + properties: + productContraAccountId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productContraAccountId + ProductContraAccountsGetResponseBody: + type: object + properties: + productContraAccounts: + type: array + items: + type: object + properties: + productContraAccountId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + contraAccountMetadata: + $ref: "#/components/schemas/ContraAccountMetadata" + concession: + $ref: "#/components/schemas/Concession" + sourceMetadata: + $ref: "#/components/schemas/SourceMetadata" + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - productContraAccountId + - contraAccountMetadataId + - concessionId + - sourceMetadataId + - costCenter + - validFrom + href: + type: string + nullable: true + description: URI for pagination. + example: null + ProductContraAccountsPatchRequestBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + concessionId: + type: integer + example: 1 + sourceMetadataId: + type: string + format: uuid + example: 08d96f94-f468-467e-9068-c86c34f43097 + costCenter: + type: string + example: 84955 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + ProductContraAccountsPatchResponseBody: + type: object + properties: + productContraAccountId: + type: string + format: uuid + example: 37a8095b-19db-498f-9349-5f37d21c5bdf + required: + - productContraAccountId + ContraAccountMetadataGetResponseBody: + type: object + properties: + contraAccountMetadata: + type: array + items: + $ref: "#/components/schemas/ContraAccountMetadata" + href: + type: string + nullable: true + description: URI for pagination. + example: null + ContraAccountMetadataPostRequestBody: + type: object + properties: + contraAccountCode: + type: string + example: 123456 + contraAccountNumber: + type: string + example: 220.10419 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountCode + - contraAccountNumber + - validFrom + ContraAccountMetadataPostResponseBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - contraAccountMetadataId + ContraAccountMetadataPatchRequestBody: + type: object + properties: + contraAccountCode: + type: string + example: 123456 + contraAccountNumber: + type: string + example: 220.10419 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + ContraAccountMetadataPatchResponseBody: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - contraAccountMetadataId + TaxMetadataGetResponseBody: + type: object + properties: + taxMetadata: + type: array + items: + type: object + properties: + taxMetadataId: + type: string + format: uuid + example: 192882fe-3f51-46bb-bfdb-2e4cb31ef925 + taxCode: + type: string + example: V21 + taxPercentageAmount: + type: integer + example: 21 + description: + type: string + example: BTW VERKOOP HOOG 21% + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - taxMetadataId + - taxCode + - taxPercentageAmount + - description + - validFrom + href: + type: string + nullable: true + description: URI for pagination. + example: null + TaxMetadataPostRequestBody: + type: object + properties: + taxCode: + type: string + example: V21 + taxPercentageAmount: + type: integer + example: 21 + description: + type: string + example: BTW VERKOOP HOOG 21% + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - taxCode + - taxPercentageAmount + - description + - validFrom + TaxMetadataPostResponseBody: + type: object + properties: + taxMetadataId: + type: string + format: uuid + example: 192882fe-3f51-46bb-bfdb-2e4cb31ef925 + required: + - taxMetadataId + TaxMetadataPatchRequestBody: + type: object + properties: + taxCode: + type: string + example: V21 + taxPercentageAmount: + type: integer + example: 21 + description: + type: string + example: BTW VERKOOP HOOG 21% + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + TaxMetadataPatchResponseBody: + type: object + properties: + taxMetadataId: + type: string + format: uuid + example: 192882fe-3f51-46bb-bfdb-2e4cb31ef925 + required: + - taxMetadataId + SourceMetadataGetResponseBody: + type: object + properties: + sourceMetadata: + type: array + items: + $ref: '#/components/schemas/SourceMetadata' + href: + type: string + nullable: true + description: URI for pagination. + example: null + SourceMetadataPostRequestBody: + type: object + properties: + incomingName: + type: string + example: VerkoopEngine + incomingEntity: + type: string + example: OrderLine + outgoingName: + type: string + example: Website Verkopen + businessOwner: + type: string + example: Corneel Verstoep + rejectionProcessing: + type: string + example: system + rejectionInfo: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - sourceMetadataId + - incomingName + - incomingEntity + - outgoingName + - businessOwner + - rejectionProcessing + - rejectionInfo + - validFrom + SourceMetadataPostResponseBody: + type: object + properties: + sourceMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - sourceMetadataId + SourceMetadataPatchRequestBody: + type: object + properties: + incomingName: + type: string + example: VerkoopEngine + incomingEntity: + type: string + example: OrderLine + outgoingName: + type: string + example: Website Verkopen + businessOwner: + type: string + example: Corneel Verstoep + rejectionProcessing: + type: string + example: system + rejectionInfo: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + SourceMetadataPatchResponseBody: + type: object + properties: + sourceMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - sourceMetadataId + AccountingPeriodMetadataGetResponseBody: + type: object + properties: + accountingPeriodMetadata: + type: array + items: + type: object + properties: + accountingPeriodMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + accountingPeriod: + type: string + example: 2024-01 + isOpen: + type: boolean + example: true + required: + - accountingPeriodMetadataId + - accountingPeriod + - isOpen + href: + type: string + nullable: true + description: URI for pagination. + example: null + AccountingPeriodMetadataPostRequestBody: + type: object + properties: + accountingPeriod: + type: string + example: 2024-01 + isOpen: + type: boolean + example: true + required: + - accountingPeriod + - isOpen + AccountingPeriodMetadataPostResponseBody: + type: object + properties: + accountingPeriodMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - accountingPeriodMetadataId + AccountingPeriodMetadataPatchRequestBody: + type: object + properties: + accountingPeriod: + type: string + example: 2024-01 + isOpen: + type: boolean + example: true + AccountingPeriodMetadataPatchResponseBody: + type: object + properties: + accountingPeriodMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - accountingPeriodMetadataId + ConcessionMetadataGetResponseBody: + type: object + properties: + concessionMetadata: + type: array + items: + type: object + properties: + concessionMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + concession: + $ref: '#/components/schemas/Concession' + percentage: + type: number + example: 84.021 + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - concessionMetadataId + - concession + - percentage + - validFrom + href: + type: string + nullable: true + description: URI for pagination. + example: null + ConcessionMetadataPostRequestBody: + type: object + properties: + concessionId: + type: integer + example: 1 + percentage: + type: number + example: 84.021 + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - concessionId + - percentage + - validFrom + ConcessionMetadataPostResponseBody: + type: object + properties: + concessionMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - concessionMetadataId + ConcessionMetadataPatchRequestBody: + type: object + properties: + concessionId: + type: integer + example: 1 + percentage: + type: number + example: 84.021 + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + ConcessionMetadataPatchResponseBody: + type: object + properties: + concessionMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + required: + - concessionMetadataId + ConcessionsGetResponseBody: + type: object + properties: + concessions: + type: array + items: + $ref: '#/components/schemas/Concession' + href: + type: string + nullable: true + description: URI for pagination. + example: null + FailureReasonsGetResponseBody: + type: object + properties: + failureReasons: + type: array + items: + $ref: '#/components/schemas/FailureReason' + href: + type: string + nullable: true + description: URI for pagination. + example: null + ContraAccountMetadata: + type: object + properties: + contraAccountMetadataId: + type: string + format: uuid + example: e0af8c8f-d421-4567-a14e-48e2a1bb86fb + contraAccountCode: + type: string + example: 123456 + contraAccountNumber: + type: string + example: 220.10419 + validFrom: + type: string + format: date-time + example: 2024-03-22T09:00:00 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - contraAccountMetadataId + - contraAccountCode + - contraAccountNumber + - validFrom + Concession: + type: object + properties: + concessionId: + type: integer + example: 1 + name: + type: string + example: bus + required: + - concessionId + SourceMetadata: + type: object + properties: + sourceMetadataId: + type: string + format: uuid + example: bc4ea24a-27a5-40e8-bbbc-57a105afaaa0 + incomingName: + type: string + example: VerkoopEngine + incomingEntity: + type: string + example: OrderLine + outgoingName: + type: string + example: Website Verkopen + businessOwner: + type: string + example: Corneel Verstoep + rejectionProcessing: + type: string + example: system + rejectionInfo: + type: string + example: api.htm.nl/v2/account/12345/msgs/abc + validFrom: + type: string + format: date-time + example: 2024-01-01T00:00:00.000 + validUntil: + type: string + format: date-time + nullable: true + example: null + required: + - sourceMetadataId + - incomingName + - incomingEntity + - outgoingName + - businessOwner + - rejectionProcessing + - rejectionInfo + - validFrom + FailureReason: + type: object + properties: + failureReasonId: + type: integer + example: 2 + reasonCode: + type: string + example: "002" + reasonDesc: + type: string + example: Contra account does not exist + required: + - failureReasonId + - reasonCode + - reasonDesc rfc9457: type: object properties: @@ -2416,10 +2939,3 @@ components: example: - "/account/12345" - "/account/67890" - postMetadataAuditTrailResponse: - type: object - properties: - metadataAuditTrailId: - type: string - format: uuid - example: 37a8095b-19db-498f-9349-5f37d21c5bdf From 5fb74ece06a6ef78804f2eef6b3d4b0e40d6f06a Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Tue, 14 Jan 2025 17:07:01 +0100 Subject: [PATCH 16/19] Added refunds endpoint to ClaimsAPI. --- src/openapi/claims/claims-forms.yaml | 269 +++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 src/openapi/claims/claims-forms.yaml diff --git a/src/openapi/claims/claims-forms.yaml b/src/openapi/claims/claims-forms.yaml new file mode 100644 index 0000000..a9f43f2 --- /dev/null +++ b/src/openapi/claims/claims-forms.yaml @@ -0,0 +1,269 @@ +openapi: 3.0.1 +info: + title: ClaimsAPI + version: '1.0' +servers: + - url: https://services.acc.api.htm.nl/chipkaart/1.0 + - url: http://services.acc.api.htm.nl/chipkaart/1.0 +security: + - default: [] +tags: + - name: Claims +paths: + /claims: + post: + tags: + - Claims + summary: Create a claim + description: > + Create a claim by sending a JSON as specified in the schema. By + specifying the chipcardnumber under 'chipkaart', + + a claim for OV chipcard will be send to the OVC API. If no + chipcardnumber is specified under 'chipkaart', a claim for EMV is send + to mendix. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/claimsEntity' + examples: + OVCK: + value: + aankomsthalte: '1' + instapdatum: '2024-03-06T15:20:44.549Z' + instaptijd: '2024-03-06T15:20:44.549Z' + ingecheckt: true + uitgecheckt: true + chipkaart: '1234123412341234' + afgeschrevenbedrag: 0 + vertrekhalte: string + korting: true + iban: '1234123412341234' + naam: string + emailadres: user@example.com + uitstaptijd: '2024-03-06T15:20:44.549Z' + verwachtbedrag: 0 + toelichting: string + lijn: '1' + vervoertype: '1' + serviceRefId: '1' + Totaalbedrag: 0 + EMV: + value: + aankomsthalte: '1' + instapdatum: '2024-03-06T15:20:44.549Z' + instaptijd: '2024-03-06T15:20:44.549Z' + ingecheckt: true + uitgecheckt: true + afgeschrevenbedrag: 0 + vertrekhalte: string + korting: true + iban: '1234123412341234' + naam: string + emailadres: user@example.com + uitstaptijd: '2024-03-06T15:20:44.549Z' + verwachtbedrag: 0 + toelichting: string + lijn: '1' + vervoertype: '1' + serviceRefId: '1' + Totaalbedrag: 0 + responses: + '200': + description: ok + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/401Response' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500Response' + security: + - default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited + /refunds: + post: + tags: + - Claims + summary: Create a refund request + description: Create a refund request by sending a JSON as specified in the schema. Either a serviceReferenceId or ovPasNumber should be present in order to fulfill the refund request. + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/refundsEntity' + examples: + EMV: + value: + emailAddress: 'j.beek@htm.nl' + orderNumber: 'ORD1000046' + serviceReferenceId: '7703be98-57f4-4d02-887f-68348788f476' + amount: 2305 + iban: 'NL98INGB0003856625' + orderDate: '2025-01-13' + productName: 'HTM 20% korting' + OVpas: + value: + emailAddress: 'j.beek@htm.nl' + orderNumber: 'ORD1000046' + ovpasNumber: '63AW974' + iban: 'NL98INGB0003856625' + orderDate: '2025-01-13' + productName: 'HTM 20% korting' + responses: + '201': + description: Created + '401': + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/401Response' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/500Response' + security: + - default: [] + x-auth-type: Application & Application User + x-throttling-tier: Unlimited +components: + schemas: + claimsEntity: + required: + - Totaalbedrag + - aankomsthalte + - afgeschrevenbedrag + - emailadres + - instapdatum + - instaptijd + - korting + - lijn + - serviceRefId + - toelichting + - uitgecheckt + - vertrekhalte + - vervoertype + - verwachtbedrag + type: object + properties: + aankomsthalte: + type: string + instapdatum: + type: string + format: date-time + instaptijd: + type: string + format: date-time + ingecheckt: + type: boolean + uitgecheckt: + type: boolean + chipkaart: + type: string + afgeschrevenbedrag: + type: number + format: float + vertrekhalte: + type: string + korting: + type: boolean + iban: + type: string + description: String of length between 15 en 32 characters + example: '1234123412341234' + naam: + type: string + emailadres: + type: string + format: email + uitstaptijd: + type: string + format: date-time + verwachtbedrag: + type: number + format: float + toelichting: + type: string + lijn: + type: string + vervoertype: + type: string + serviceRefId: + type: string + Totaalbedrag: + type: number + format: float + refundsEntity: + required: + - emailAddress + - iban + type: object + properties: + emailAddress: + type: string + format: email + example: j.beek@htm.nl + orderNumber: + type: string + example: ORD1000046 + serviceReferenceId: + type: string + format: uuid + example: 7703be98-57f4-4d02-887f-68348788f476 + amount: + type: integer + example: 12305 + ovpasNumber: + type: string + example: 63AW974 + iban: + type: string + example: NL00RABO000001337 + orderDate: + type: string + format: date + example: 2025-01-13 + productName: + type: string + example: HTM 20% korting + 401Response: + type: object + properties: + code: + type: string + example: '900901' + type: + type: string + message: + type: string + example: Invalid Credentials + description: + type: string + example: >- + Invalid Credentials. Make sure you have provided the correct + security credentials + 500Response: + type: object + properties: + error: + type: string + example: error while connecting to backend + securitySchemes: + default: + type: oauth2 + flows: + implicit: + authorizationUrl: https://services.acc.api.htm.nl/authorize + scopes: {} From b869b712a2dcdf40c461d8ec0b9cdcfe7611702a Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 16 Jan 2025 10:44:36 +0100 Subject: [PATCH 17/19] OVPAY-526 - Added external endpoints. --- src/openapi/fiko/fiko-crud.yaml | 57 ++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 94d7930..4a857e6 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -6,6 +6,44 @@ info: servers: - url: https://api.integratielaag.nl/v1 paths: + /fiko/transactionitems: + post: + summary: Add a finanicial transaction item. + description: Add a finanicial transaction item. + tags: + - External FIKO endpoints v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsPostRequestBody" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsPostResponseBody" + /fiko/transactionitems/bulk: + post: + summary: Add one ore more finanicial transaction items in bulk. + description: Add one ore more finanicial transaction items in bulk. + tags: + - External FIKO endpoints v2 + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsBulkPostRequestBody" + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/TransactionItemsBulkPostResponseBody" /transactionitems: get: summary: Find transaction items. @@ -149,25 +187,6 @@ paths: application/json: schema: $ref: "#/components/schemas/TransactionItemsPostResponseBody" - /transactionitems/bulk: - post: - summary: Add one ore more finanicial transaction items in bulk. - description: Add one ore more finanicial transaction items in bulk. - tags: - - Transactions v2 - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/TransactionItemsBulkPostRequestBody" - responses: - "201": - description: Created - content: - application/json: - schema: - $ref: "#/components/schemas/TransactionItemsBulkPostResponseBody" /transactionitems/{transactionItemId}: parameters: - in: path From 04d251a3e28a3824eb4ef151e5ae69a6982261eb Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 16 Jan 2025 11:25:01 +0100 Subject: [PATCH 18/19] Typo in serviceReferenceId example --- src/openapi/claims/claims-forms.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/openapi/claims/claims-forms.yaml b/src/openapi/claims/claims-forms.yaml index a9f43f2..f2017dc 100644 --- a/src/openapi/claims/claims-forms.yaml +++ b/src/openapi/claims/claims-forms.yaml @@ -106,7 +106,7 @@ paths: value: emailAddress: 'j.beek@htm.nl' orderNumber: 'ORD1000046' - serviceReferenceId: '7703be98-57f4-4d02-887f-68348788f476' + serviceReferenceId: 'NLOVA5BCD124H3Z21X' amount: 2305 iban: 'NL98INGB0003856625' orderDate: '2025-01-13' @@ -220,8 +220,7 @@ components: example: ORD1000046 serviceReferenceId: type: string - format: uuid - example: 7703be98-57f4-4d02-887f-68348788f476 + example: NLOVA5BCD124H3Z21X amount: type: integer example: 12305 From 8f8edfacb01c7702256b0a17fc46b44da663f348 Mon Sep 17 00:00:00 2001 From: "b.boterman@htm.nl" Date: Thu, 16 Jan 2025 13:08:06 +0100 Subject: [PATCH 19/19] OVPAY-526 - Add single transaction is deprecated. --- src/openapi/fiko/fiko-crud.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openapi/fiko/fiko-crud.yaml b/src/openapi/fiko/fiko-crud.yaml index 4a857e6..46a74ce 100644 --- a/src/openapi/fiko/fiko-crud.yaml +++ b/src/openapi/fiko/fiko-crud.yaml @@ -8,8 +8,9 @@ servers: paths: /fiko/transactionitems: post: - summary: Add a finanicial transaction item. - description: Add a finanicial transaction item. + summary: DEPRECATED. Add a finanicial transaction item. + description: DEPRECATED. This API is deprecated. Use bulk-insert instead. + deprecated: true tags: - External FIKO endpoints v2 requestBody: