From 8831de0ba9de77848fea32a4c82043c1a985ab75 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Fri, 21 Mar 2025 17:39:35 +0100 Subject: [PATCH 1/7] Add gitignore for local padp poc files --- .../PadpReferenceApi/.gitignore | 307 ++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 src/dotnet/padp-reference-web/PadpReferenceApi/.gitignore diff --git a/src/dotnet/padp-reference-web/PadpReferenceApi/.gitignore b/src/dotnet/padp-reference-web/PadpReferenceApi/.gitignore new file mode 100644 index 0000000..bfc4102 --- /dev/null +++ b/src/dotnet/padp-reference-web/PadpReferenceApi/.gitignore @@ -0,0 +1,307 @@ +######################## +## ## +## CUSTOM IGNORE LIST ## +## ## +######################## + +# Ignore appsettings.json as it contains credentials - only the template should be shared! +appsettings.json + +# Also ignore pfx and pem files for the same reason +*.pfx +*.pem + + + + + + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ +**/Properties/launchSettings.json + +# VS Code +.vscode/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Typescript v1 declaration files +typings/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs \ No newline at end of file From 665ca2aae10d0a050483b4928d922d007bb2d814 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Fri, 21 Mar 2025 17:40:55 +0100 Subject: [PATCH 2/7] Add OpenAPI spec for retrieving GboAgeProfile --- .../orders/SE-orders-gboAGeProfile.yaml | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 src/openapi/orders/SE-orders-gboAGeProfile.yaml diff --git a/src/openapi/orders/SE-orders-gboAGeProfile.yaml b/src/openapi/orders/SE-orders-gboAGeProfile.yaml new file mode 100644 index 0000000..426ec6e --- /dev/null +++ b/src/openapi/orders/SE-orders-gboAGeProfile.yaml @@ -0,0 +1,150 @@ +openapi: 3.0.1 +info: + title: ABT Service Engine Order APIs + version: "1.0" + description: Order APIs available in the Service Engine for order validation and fulfillment. +servers: + - url: https://api.integratielaag.nl/abt/abtserviceengine/1.0 +paths: + /orders/validation/gboAgeProfile: + get: + tags: + - ServiceEngine Order validation + summary: Get GBO age profile that is valid for the given input + description: |- + Only one age profile can be valid at any one time, so only one profile is returned. + parameters: + - name: productStartDate + in: query + required: true + description: Start date of product validity + schema: + type: string + format: date + example: 2025-03-20 + - name: birthDate + in: query + required: true + description: Birthdate of the OVpay-token holder + schema: + type: string + format: date + example: 2000-01-01 + - name: ovPayTokenId + in: query + required: false + description: ovPayTokenId of the customer's selected token + schema: + type: integer + example: 1 + - name: customerTokenId + in: query + required: false + description: customerTokenId of the customer's selected token + schema: + type: string + format: uuid + example: "4a2d2c9c-1e5d-4d8a-9c0a-6c0a6c0a6c0a" + - name: serviceReferenceId + in: query + required: false + description: serviceReferenceId of the customer's selected token + schema: + type: string + example: "NLOV1234567ABCDEFG" + - name: amount + in: query + required: false + description: amount belonging to the serviceReferenceId + schema: + type: number + example: 100 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GboAgeProfileResponse" + + "400": + description: Bad request + content: + application/json: + schema: + $ref: "#/components/schemas/rfc9457Response" + examples: + Missing parameter(s): + summary: Missing parameter(s) + value: + { + "type": "https://www.htm.nl/api/v1/400Error", + "title": "Missing parameter(s)", + "detail": "At least one of the following parameters must be present: ovPayTokenId, customerTokenId, (serviceReferenceId and amount)", + "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", + "apiErrorCode": "htm.api.err.400.2", + } + Invalid date format: + summary: Invalid date format + value: + { + "type": "https://www.htm.nl/api/v1/400Error", + "title": "Invalid input", + "detail": "The given birthDate is not a valid Date format", + "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", + "apiErrorCode": "htm.api.err.400.3", + } + +components: + schemas: + GboAgeProfileResponse: + type: object + required: + - gboAgeProfileId + - name + - minAge + - maxAge + properties: + gboAgeProfileId: + type: integer + example: 1 + name: + type: string + example: Kind (4 t/m 11 jaar) + minAge: + type: integer + example: 4 + maxAge: + type: integer + example: 11 + rfc9457Response: + type: object + properties: + type: + type: string + format: url + example: "https://www.htm.nl/api/v1/rfc9457Error" + title: + type: string + description: "Short summary of the error." + example: "The request is not valid." + detail: + type: string + description: "More detailed descriptionof the error." + example: "Some required parameters are missing." + instance: + type: string + description: "Unique identifier to correlate this specific error with logging in other applications." + example: "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c" + additionalProperty1: + type: string + description: "Example of an additional property value to be used for error reporting." + example: "additionalValue1" + additionalProperty2: + type: array + description: "Example of an additional property array to be used for error reporting." + items: + type: string + example: + - "additionalValue2-1" + - "additionalValue2-2" From 3e4760f6c475f3de903caf7be28e16ff5bedb8a6 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Fri, 21 Mar 2025 17:57:18 +0100 Subject: [PATCH 3/7] Add 404 error when no PAD present for OVpay token --- .../orders/SE-orders-gboAGeProfile.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/openapi/orders/SE-orders-gboAGeProfile.yaml b/src/openapi/orders/SE-orders-gboAGeProfile.yaml index 426ec6e..daa5b07 100644 --- a/src/openapi/orders/SE-orders-gboAGeProfile.yaml +++ b/src/openapi/orders/SE-orders-gboAGeProfile.yaml @@ -94,7 +94,23 @@ paths: "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", "apiErrorCode": "htm.api.err.400.3", } - + "404": + description: Not found + content: + application/json: + schema: + $ref: "#/components/schemas/rfc9457Response" + examples: + No birthdate present in PAD of OVpay token: + summary: No birthdate present in PAD of OVpay token + value: + { + "type": "https://www.htm.nl/api/v1/404Error", + "title": "Missing birthdate in PAD", + "detail": "There is no birthdate present in the PAD of the OVpay token, or there is no PAD present at all", + "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", + "apiErrorCode": "htm.api.err.404.1", + } components: schemas: GboAgeProfileResponse: From 20a50aa5016ecf098ec7dba0eb730ac5c3b61907 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 24 Mar 2025 08:59:04 +0000 Subject: [PATCH 4/7] Rename minAge and maxAge to ageFromInclusive and ageUntilInclusive --- src/openapi/orders/SE-orders-gboAGeProfile.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openapi/orders/SE-orders-gboAGeProfile.yaml b/src/openapi/orders/SE-orders-gboAGeProfile.yaml index daa5b07..31e9d54 100644 --- a/src/openapi/orders/SE-orders-gboAGeProfile.yaml +++ b/src/openapi/orders/SE-orders-gboAGeProfile.yaml @@ -118,8 +118,8 @@ components: required: - gboAgeProfileId - name - - minAge - - maxAge + - ageFromInclusive + - ageUntilInclusive properties: gboAgeProfileId: type: integer @@ -127,10 +127,10 @@ components: name: type: string example: Kind (4 t/m 11 jaar) - minAge: + ageFromInclusive: type: integer example: 4 - maxAge: + ageUntilInclusive: type: integer example: 11 rfc9457Response: From 5ec911727b688a976a02c6fe1e85e92abd2b28ec Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 24 Mar 2025 08:59:40 +0000 Subject: [PATCH 5/7] Fix typo in filename --- ...{SE-orders-gboAGeProfile.yaml => SE-orders-gboAgeProfile.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/openapi/orders/{SE-orders-gboAGeProfile.yaml => SE-orders-gboAgeProfile.yaml} (100%) diff --git a/src/openapi/orders/SE-orders-gboAGeProfile.yaml b/src/openapi/orders/SE-orders-gboAgeProfile.yaml similarity index 100% rename from src/openapi/orders/SE-orders-gboAGeProfile.yaml rename to src/openapi/orders/SE-orders-gboAgeProfile.yaml From b7d8eff312bec28456a4010a2beb4d9c3eb5f3bb Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 24 Mar 2025 11:28:03 +0000 Subject: [PATCH 6/7] Add ovPasNumber and verificationCode, make birthDate optional, change type of amount to integer --- .../orders/SE-orders-gboAgeProfile.yaml | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/openapi/orders/SE-orders-gboAgeProfile.yaml b/src/openapi/orders/SE-orders-gboAgeProfile.yaml index 31e9d54..a3a23a4 100644 --- a/src/openapi/orders/SE-orders-gboAgeProfile.yaml +++ b/src/openapi/orders/SE-orders-gboAgeProfile.yaml @@ -24,7 +24,7 @@ paths: example: 2025-03-20 - name: birthDate in: query - required: true + required: false description: Birthdate of the OVpay-token holder schema: type: string @@ -57,8 +57,22 @@ paths: required: false description: amount belonging to the serviceReferenceId schema: - type: number + type: integer example: 100 + - name: ovPasNumber + in: query + required: false + description: OVpas number of the customer's selected token + schema: + type: string + example: "63AW974" + - name: verificationCode + in: query + required: false + description: verification code belonging to the OVpas number + schema: + type: string + example: 1A3C7D responses: "200": description: OK @@ -80,7 +94,7 @@ paths: { "type": "https://www.htm.nl/api/v1/400Error", "title": "Missing parameter(s)", - "detail": "At least one of the following parameters must be present: ovPayTokenId, customerTokenId, (serviceReferenceId and amount)", + "detail": "At least one of the following parameters must be present: birthDate, ovPayTokenId, customerTokenId, (serviceReferenceId and amount), (ovPasNumber and verificationCode)", "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", "apiErrorCode": "htm.api.err.400.2", } @@ -119,7 +133,7 @@ components: - gboAgeProfileId - name - ageFromInclusive - - ageUntilInclusive + - ageToInclusive properties: gboAgeProfileId: type: integer @@ -130,7 +144,7 @@ components: ageFromInclusive: type: integer example: 4 - ageUntilInclusive: + ageToInclusive: type: integer example: 11 rfc9457Response: From 024af73bcee98733ffed86993bdbe3a3f61fd777 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 7 Apr 2025 12:17:08 +0200 Subject: [PATCH 7/7] lowercase p --- src/openapi/orders/SE-orders-gboAgeProfile.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openapi/orders/SE-orders-gboAgeProfile.yaml b/src/openapi/orders/SE-orders-gboAgeProfile.yaml index a3a23a4..a78d4e4 100644 --- a/src/openapi/orders/SE-orders-gboAgeProfile.yaml +++ b/src/openapi/orders/SE-orders-gboAgeProfile.yaml @@ -59,7 +59,7 @@ paths: schema: type: integer example: 100 - - name: ovPasNumber + - name: ovpasNumber in: query required: false description: OVpas number of the customer's selected token @@ -94,7 +94,7 @@ paths: { "type": "https://www.htm.nl/api/v1/400Error", "title": "Missing parameter(s)", - "detail": "At least one of the following parameters must be present: birthDate, ovPayTokenId, customerTokenId, (serviceReferenceId and amount), (ovPasNumber and verificationCode)", + "detail": "At least one of the following parameters must be present: birthDate, ovPayTokenId, customerTokenId, (serviceReferenceId and amount), (ovpasNumber and verificationCode)", "instance": "urn:uuid:13c8416f-7632-4c8b-8a16-2132197be60c", "apiErrorCode": "htm.api.err.400.2", }