Merge branch 'develop' into feature/OVPAY-96

This commit is contained in:
Max Martens 2025-01-09 16:29:51 +00:00
commit 19ecad4a1d
4 changed files with 2181 additions and 907 deletions

View File

@ -235,6 +235,136 @@ paths:
"isCredit": false, "isCredit": false,
}, },
] ]
/contracts/{contractId}/cancellationmoments:
parameters:
- in: header
name: X-HTM-JWT-AUTH-HEADER
schema:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
required: true
description: The JWT of the logged in customer.
- in: path
name: contractId
schema:
type: string
format: uuid
example: 9e224750-3065-471d-af57-85b9cffa7c89
required: true
description: The id of the contract to process.
get:
summary: Get all cancellation moments for a given contract.
description: Get all cancellation moments for a given contract.
tags:
- SE Contract Cancellation v2
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"cancellationMoment": "termBound",
"termDuration": "P1M",
"billingDay": 18,
"cancellationFrom": "2024-08-10T00:00:00",
"cancellationUntil": "2026-08-10T00:00:00"
}
/contracts/{contractId}/cancellationvalidation:
parameters:
- in: header
name: X-HTM-JWT-AUTH-HEADER
schema:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
required: true
description: The JWT of the logged in customer.
- in: path
name: contractId
schema:
type: string
format: uuid
example: 9e224750-3065-471d-af57-85b9cffa7c89
required: true
description: The id of the contract to process.
post:
summary: Validate a cancellation for a given contract.
description: Validate a cancellation for a given contract.
tags:
- SE Contract Cancellation v2
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"end": "2024-08-10T00:00:00"
}
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"validationResult": "true",
"validationMessage": "",
"end": "2024-08-10T03:59:59",
"refundAmount": "2489",
"refundMethods": [ "creditInvoice", "iDeal" ]
}
/contracts/{contractId}/cancellation:
parameters:
- in: header
name: X-HTM-JWT-AUTH-HEADER
schema:
type: string
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
required: true
description: The JWT of the logged in customer.
- in: path
name: contractId
schema:
type: string
format: uuid
example: 9e224750-3065-471d-af57-85b9cffa7c89
required: true
description: The id of the contract to process.
post:
summary: Cancel a contract.
description: Cancel a contract.
tags:
- SE Contract Cancellation v2
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"end": "2024-08-10T00:00:00",
"refundMethod": "creditInvoice"
}
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/unavailable"
example:
{
"end": "2024-08-10T03:59:59",
"refundAmount": "2489",
"refundMethod": "creditInvoice"
}
components: components:
securitySchemes: securitySchemes:
bearerToken: bearerToken:

File diff suppressed because it is too large Load Diff

View File

@ -21,7 +21,7 @@ paths:
required: false required: false
description: The technical id of the product. description: The technical id of the product.
- in: query - in: query
name: createdBefore name: createdOnBefore
schema: schema:
type: string type: string
format: date-time format: date-time
@ -29,7 +29,7 @@ paths:
required: false required: false
description: The purchased product should be created before this timestamp. description: The purchased product should be created before this timestamp.
- in: query - in: query
name: createdAfter name: createdOnAfter
schema: schema:
type: string type: string
format: date-time format: date-time
@ -37,7 +37,7 @@ paths:
required: false required: false
description: The purchased product should be created after this timestamp. description: The purchased product should be created after this timestamp.
- in: query - in: query
name: lastUpdatedBefore name: lastUpdatedOnBefore
schema: schema:
type: string type: string
format: date-time format: date-time
@ -45,7 +45,7 @@ paths:
required: false required: false
description: The purchased product should be last updated before this timestamp. description: The purchased product should be last updated before this timestamp.
- in: query - in: query
name: lastUpdatedAfter name: lastUpdatedOnAfter
schema: schema:
type: string type: string
format: date-time format: date-time
@ -53,14 +53,14 @@ paths:
required: false required: false
description: The purchased product should be last updated after this timestamp. description: The purchased product should be last updated after this timestamp.
- in: query - in: query
name: resrouceName name: resourceName
schema: schema:
type: string type: string
example: orders example: orders
required: false required: false
description: The name of the resource. description: The name of the resource.
- in: query - in: query
name: resrouceIdentifier name: resourceIdentifier
schema: schema:
type: string type: string
example: f461004f-d98e-4323-aa26-f09bf8ea2f2d example: f461004f-d98e-4323-aa26-f09bf8ea2f2d
@ -74,6 +74,8 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{
"purchasedProducts":
[ [
{ {
"purchasedProductId": "45573af8-a9aa-4f7c-95f4-b1971bf2c3c6", "purchasedProductId": "45573af8-a9aa-4f7c-95f4-b1971bf2c3c6",
@ -101,16 +103,24 @@ paths:
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd", "purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
"salesTimestamp": "2024-10-04T12:34:56.000", "salesTimestamp": "2024-10-04T12:34:56.000",
"refundTimestamp": "2024-10-04T12:34:56.000", "refundTimestamp": "2024-10-04T12:34:56.000",
"fromInclusive": "2024-10-04T12:34:56.000",
"untilInclusive": "2024-10-04T12:34:56.000",
"packageTemplateId": "30003", "packageTemplateId": "30003",
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b", "xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8", "xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b", "xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f", "customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
"ovPayTokenId": 13, "ovPayTokenId": 13,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
}, },
], ],
}, },
] ],
"href": null,
}
post: post:
tags: tags:
- Purchased Product - Purchased Product
@ -130,12 +140,11 @@ paths:
"purchasedProductResources": "purchasedProductResources":
[ [
{ {
"resourceName": "resourceNameId": 1,
{ "resourceNameId": 1, "name": "contracts" },
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7", "resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
}, },
{ {
"resourceName": { "resourceNameId": 2, "name": "orders" }, "resourceNameId": 2,
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e", "resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
}, },
], ],
@ -144,12 +153,18 @@ paths:
{ {
"salesTimestamp": "2024-10-04T12:34:56.000", "salesTimestamp": "2024-10-04T12:34:56.000",
"refundTimestamp": "2024-10-04T12:34:56.000", "refundTimestamp": "2024-10-04T12:34:56.000",
"fromInclusive": "2024-10-04T12:34:56.000",
"untilInclusive": "2024-10-04T12:34:56.000",
"packageTemplateId": "30003", "packageTemplateId": "30003",
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b", "xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8", "xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b", "xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f", "customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
"ovPayTokenId": 13, "ovPayTokenId": 13,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
}, },
], ],
} }
@ -208,12 +223,18 @@ paths:
{ {
"salesTimestamp": "2024-10-04T12:34:56.000", "salesTimestamp": "2024-10-04T12:34:56.000",
"refundTimestamp": "2024-10-04T12:34:56.000", "refundTimestamp": "2024-10-04T12:34:56.000",
"fromInclusive": "2024-10-04T12:34:56.000",
"untilInclusive": "2024-10-04T12:34:56.000",
"packageTemplateId": "30003", "packageTemplateId": "30003",
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b", "xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8", "xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b", "xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f", "customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
"ovPayTokenId": 13, "ovPayTokenId": 13,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
}, },
], ],
} }
@ -261,7 +282,7 @@ paths:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{ {
"resourceName": 1, "resourceNameId": 1,
"resourceIdentifier": "502d2e0d-4e3b-4a7e-9f6e-0d0b1e1e1e1e", "resourceIdentifier": "502d2e0d-4e3b-4a7e-9f6e-0d0b1e1e1e1e",
} }
responses: responses:
@ -300,12 +321,18 @@ paths:
{ {
"salesTimestamp": "2024-10-04T12:34:56.000", "salesTimestamp": "2024-10-04T12:34:56.000",
"refundTimestamp": "2024-10-04T12:34:56.000", "refundTimestamp": "2024-10-04T12:34:56.000",
"fromInclusive": "2024-10-04T12:34:56.000",
"untilInclusive": "2024-10-04T12:34:56.000",
"packageTemplateId": "30003", "packageTemplateId": "30003",
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b", "xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8", "xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b", "xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f", "customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
"ovPayTokenId": 13, "ovPayTokenId": 13,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
} }
responses: responses:
"201": "201":
@ -367,6 +394,34 @@ paths:
format: date-time format: date-time
example: 2024-10-04T12:34:56.000 example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be refunded after this timestamp. description: The purchased GBO product should be refunded after this timestamp.
- in: query
name: fromInclusiveBefore
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be valid before this timestamp.
- in: query
name: fromInclusiveAfter
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be valid after this timestamp.
- in: query
name: untilInclusiveBefore
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be valid before this timestamp.
- in: query
name: untilInclusiveAfter
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be valid after this timestamp.
- in: query - in: query
name: packageTemplateId name: packageTemplateId
schema: schema:
@ -408,6 +463,46 @@ paths:
type: integer type: integer
example: 13 example: 13
description: The id of the ov pay token. description: The id of the ov pay token.
- in: query
name: createdOnBefore
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be created before this timestamp.
- in: query
name: createdOnAfter
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be created after this timestamp.
- in: query
name: lastUpdatedOnBefore
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be updated before this timestamp.
- in: query
name: lastUpdatedOnAfter
schema:
type: string
format: date-time
example: 2024-10-04T12:34:56.000
description: The purchased GBO product should be updated after this timestamp.
- in: query
name: createdBy
schema:
type: string
example: someuser
description: The user that created the purchased GBO product.
- in: query
name: lastUpdatedBy
schema:
type: string
example: someuser
description: The user that last updated the purchased GBO product.
responses: responses:
"201": "201":
description: Created description: Created
@ -416,32 +511,48 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{
"purchasedGboProducts":
[ [
{ {
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd", "purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
"purchasedProductId": "9e166bb3-806a-4f43-a7a2-0d5b1e90e0c3", "purchasedProductId": "9e166bb3-806a-4f43-a7a2-0d5b1e90e0c3",
"salesTimestamp": "2024-10-04T12:34:56.000", "salesTimestamp": "2024-10-04T12:34:56.000",
"refundTimestamp": "2024-10-05T12:34:56.000", "refundTimestamp": "2024-10-05T12:34:56.000",
"fromInclusive": "2024-10-04T12:34:56.000",
"untilInclusive": "2024-10-05T12:34:56.000",
"packageTemplateId": "30003", "packageTemplateId": "30003",
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b", "xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8", "xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b", "xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f", "customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
"ovPayTokenId": 13, "ovPayTokenId": 13,
"createdOn": "2024-10-04T12:34:56.000",
"lastUpdatedOn": "2024-10-04T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
}, },
{ {
"purchasedGboProductId": 431e481f-4330-4ad4-be47-393db38cfe38, "purchasedGboProductId": 431e481f-4330-4ad4-be47-393db38cfe38,
"purchasedProductId": "9e166bb3-806a-4f43-a7a2-0d5b1e90e0c3", "purchasedProductId": "9e166bb3-806a-4f43-a7a2-0d5b1e90e0c3",
"salesTimestamp": "2024-10-05T12:34:56.000", "salesTimestamp": "2024-10-05T12:34:56.000",
"refundTimestamp": "2024-10-06T12:34:56.000", "refundTimestamp": "2024-10-06T12:34:56.000",
"fromInclusive": "2024-10-05T12:34:56.000",
"untilInclusive": "2024-10-06T12:34:56.000",
"packageTemplateId": "30003", "packageTemplateId": "30003",
"xBot": "f8f13d64-fd07-44e8-9c85-968857da5d68", "xBot": "f8f13d64-fd07-44e8-9c85-968857da5d68",
"xTat": "01a82ebe-5d07-45d8-a897-66152e8954dd", "xTat": "01a82ebe-5d07-45d8-a897-66152e8954dd",
"xSpit": "c3868858-b250-4480-9cb4-725d2e9198f3", "xSpit": "c3868858-b250-4480-9cb4-725d2e9198f3",
"customerTokenId": "6c7a6d4b-7e6c-4f6a-9b1e-0a9b1e6c7a6d", "customerTokenId": "6c7a6d4b-7e6c-4f6a-9b1e-0a9b1e6c7a6d",
"ovPayTokenId": 14, "ovPayTokenId": 14,
"createdOn": "2024-10-05T12:34:56.000",
"lastUpdatedOn": "2024-10-05T12:34:56.000",
"createdBy": "someuser",
"lastUpdatedBy": null,
}, },
] ],
"href": null,
}
/purchasedgboproducts/{purchasedGboProductId}: /purchasedgboproducts/{purchasedGboProductId}:
parameters: parameters:
- in: path - in: path
@ -463,7 +574,12 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: { "refundTimestamp": "2024-10-05T12:34:56.000" } example:
{
"refundTimestamp": "2024-10-05T12:34:56.000",
"lastUpdatedOn": "2024-10-05T12:34:56.000",
"lastUpdatedBy": "someuser",
}
responses: responses:
"201": "201":
description: Created description: Created
@ -472,7 +588,9 @@ paths:
schema: schema:
$ref: "#/components/schemas/unavailable" $ref: "#/components/schemas/unavailable"
example: example:
{ "purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd" } {
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
}
components: components:
securitySchemes: securitySchemes:
bearerToken: bearerToken:

View File

@ -0,0 +1,52 @@
// ==UserScript==
// @name gitea-add-swagger-button
// @namespace https://integratielaag.nl/
// @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';
// 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 = `<a class="ui mini basic button" target="_blank" href="${swaggerBaseURL}${gitBaseURL}/${hrefValue}">Swagger</a>`;
// Add the Swagger button to the HTML
childDiv.innerHTML = swaggerButton + childDiv.innerHTML;
} else {
console.log('No <a> 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.`);
}
})();