develop #38
@ -235,6 +235,136 @@ paths:
|
||||
"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:
|
||||
securitySchemes:
|
||||
bearerToken:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ paths:
|
||||
required: false
|
||||
description: The technical id of the product.
|
||||
- in: query
|
||||
name: createdBefore
|
||||
name: createdOnBefore
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
@ -29,7 +29,7 @@ paths:
|
||||
required: false
|
||||
description: The purchased product should be created before this timestamp.
|
||||
- in: query
|
||||
name: createdAfter
|
||||
name: createdOnAfter
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
@ -37,7 +37,7 @@ paths:
|
||||
required: false
|
||||
description: The purchased product should be created after this timestamp.
|
||||
- in: query
|
||||
name: lastUpdatedBefore
|
||||
name: lastUpdatedOnBefore
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
@ -45,7 +45,7 @@ paths:
|
||||
required: false
|
||||
description: The purchased product should be last updated before this timestamp.
|
||||
- in: query
|
||||
name: lastUpdatedAfter
|
||||
name: lastUpdatedOnAfter
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
@ -53,14 +53,14 @@ paths:
|
||||
required: false
|
||||
description: The purchased product should be last updated after this timestamp.
|
||||
- in: query
|
||||
name: resrouceName
|
||||
name: resourceName
|
||||
schema:
|
||||
type: string
|
||||
example: orders
|
||||
required: false
|
||||
description: The name of the resource.
|
||||
- in: query
|
||||
name: resrouceIdentifier
|
||||
name: resourceIdentifier
|
||||
schema:
|
||||
type: string
|
||||
example: f461004f-d98e-4323-aa26-f09bf8ea2f2d
|
||||
@ -74,6 +74,8 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{
|
||||
"purchasedProducts":
|
||||
[
|
||||
{
|
||||
"purchasedProductId": "45573af8-a9aa-4f7c-95f4-b1971bf2c3c6",
|
||||
@ -101,16 +103,24 @@ paths:
|
||||
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
|
||||
"salesTimestamp": "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",
|
||||
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
|
||||
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
|
||||
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
|
||||
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
|
||||
"ovPayTokenId": 13,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"createdBy": "someuser",
|
||||
"lastUpdatedBy": null,
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
],
|
||||
"href": null,
|
||||
}
|
||||
post:
|
||||
tags:
|
||||
- Purchased Product
|
||||
@ -130,12 +140,11 @@ paths:
|
||||
"purchasedProductResources":
|
||||
[
|
||||
{
|
||||
"resourceName":
|
||||
{ "resourceNameId": 1, "name": "contracts" },
|
||||
"resourceNameId": 1,
|
||||
"resourceIdentifier": "408eefa9-b393-4bb3-8439-b2e51833abc7",
|
||||
},
|
||||
{
|
||||
"resourceName": { "resourceNameId": 2, "name": "orders" },
|
||||
"resourceNameId": 2,
|
||||
"resourceIdentifier": "f809a6e1-1c8d-4f8e-8a6e-0d0b1e1e1e1e",
|
||||
},
|
||||
],
|
||||
@ -144,12 +153,18 @@ paths:
|
||||
{
|
||||
"salesTimestamp": "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",
|
||||
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
|
||||
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
|
||||
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
|
||||
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
|
||||
"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",
|
||||
"refundTimestamp": "2024-10-04T12:34:56.000",
|
||||
"fromInclusive": "2024-10-04T12:34:56.000",
|
||||
"untilInclusive": "2024-10-04T12:34:56.000",
|
||||
"packageTemplateId": "30003",
|
||||
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
|
||||
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
|
||||
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
|
||||
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
|
||||
"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"
|
||||
example:
|
||||
{
|
||||
"resourceName": 1,
|
||||
"resourceNameId": 1,
|
||||
"resourceIdentifier": "502d2e0d-4e3b-4a7e-9f6e-0d0b1e1e1e1e",
|
||||
}
|
||||
responses:
|
||||
@ -300,12 +321,18 @@ paths:
|
||||
{
|
||||
"salesTimestamp": "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",
|
||||
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
|
||||
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
|
||||
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
|
||||
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
|
||||
"ovPayTokenId": 13,
|
||||
"createdOn": "2024-10-04T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-04T12:34:56.000",
|
||||
"createdBy": "someuser",
|
||||
"lastUpdatedBy": null,
|
||||
}
|
||||
responses:
|
||||
"201":
|
||||
@ -367,6 +394,34 @@ paths:
|
||||
format: date-time
|
||||
example: 2024-10-04T12:34:56.000
|
||||
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
|
||||
name: packageTemplateId
|
||||
schema:
|
||||
@ -408,6 +463,46 @@ paths:
|
||||
type: integer
|
||||
example: 13
|
||||
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:
|
||||
"201":
|
||||
description: Created
|
||||
@ -416,32 +511,48 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{
|
||||
"purchasedGboProducts":
|
||||
[
|
||||
{
|
||||
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
|
||||
"purchasedProductId": "9e166bb3-806a-4f43-a7a2-0d5b1e90e0c3",
|
||||
"salesTimestamp": "2024-10-04T12: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",
|
||||
"xBot": "f15efe6f-7353-4968-b134-60ba6fc2da8b",
|
||||
"xTat": "42efebf7-132e-4ee0-9cbb-4037a9a54ad8",
|
||||
"xSpit": "d67b2f72-918a-4e6c-957d-a39ed9c9e16b",
|
||||
"customerTokenId": "b6492322-c458-4857-9ac3-a109c1887b9f",
|
||||
"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,
|
||||
"purchasedProductId": "9e166bb3-806a-4f43-a7a2-0d5b1e90e0c3",
|
||||
"salesTimestamp": "2024-10-05T12: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",
|
||||
"xBot": "f8f13d64-fd07-44e8-9c85-968857da5d68",
|
||||
"xTat": "01a82ebe-5d07-45d8-a897-66152e8954dd",
|
||||
"xSpit": "c3868858-b250-4480-9cb4-725d2e9198f3",
|
||||
"customerTokenId": "6c7a6d4b-7e6c-4f6a-9b1e-0a9b1e6c7a6d",
|
||||
"ovPayTokenId": 14,
|
||||
"createdOn": "2024-10-05T12:34:56.000",
|
||||
"lastUpdatedOn": "2024-10-05T12:34:56.000",
|
||||
"createdBy": "someuser",
|
||||
"lastUpdatedBy": null,
|
||||
},
|
||||
]
|
||||
],
|
||||
"href": null,
|
||||
}
|
||||
/purchasedgboproducts/{purchasedGboProductId}:
|
||||
parameters:
|
||||
- in: path
|
||||
@ -463,7 +574,12 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$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:
|
||||
"201":
|
||||
description: Created
|
||||
@ -472,7 +588,9 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/unavailable"
|
||||
example:
|
||||
{ "purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd" }
|
||||
{
|
||||
"purchasedGboProductId": "a9b3dea5-fb8a-4b1e-9fe6-90cad31c0cfd",
|
||||
}
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerToken:
|
||||
|
||||
52
src/plugins/gitea-add-swagger-button.user.js
Normal file
52
src/plugins/gitea-add-swagger-button.user.js
Normal 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.`);
|
||||
}
|
||||
})();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user