From 1a4c15fecb6727bf7b7c6b473cce482cca0d070c Mon Sep 17 00:00:00 2001 From: pagopa-github-bot <> Date: Wed, 3 Aug 2022 15:33:32 +0000 Subject: [PATCH] Bump version [skip ci] --- helm/values-dev.yaml | 2 +- helm/values-uat.yaml | 21 +- openapi/openapi.json | 3564 +++++++++++++++++++++--------------------- pom.xml | 2 +- 4 files changed, 1785 insertions(+), 1804 deletions(-) diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 2f7a270..25bffa3 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: pagopadcommonacr.azurecr.io/pagopaspontaneouspayments - tag: "latest" #improve + tag: "0.0.3-19" #improve pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index dfce1ba..d78ddad 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -2,12 +2,10 @@ microservice-chart: namespace: "gps" nameOverride: "" fullnameOverride: "" - image: repository: pagopaucommonacr.azurecr.io/pagopaspontaneouspayments - tag: "latest" #improve + tag: "0.0.3-19" #improve pullPolicy: Always - livenessProbe: httpGet: path: /actuator/health/liveness @@ -15,7 +13,6 @@ microservice-chart: initialDelaySeconds: 90 failureThreshold: 6 periodSeconds: 10 - readinessProbe: httpGet: path: /actuator/health/readiness @@ -23,34 +20,26 @@ microservice-chart: initialDelaySeconds: 90 failureThreshold: 6 periodSeconds: 10 - deployment: create: true - service: create: true type: ClusterIP port: 8080 - ingress: create: true host: "weuuat.gps.internal.uat.platform.pagopa.it" path: /pagopa-spontaneous-payments-service/(.*) - serviceAccount: create: false annotations: {} name: "" - podAnnotations: {} - podSecurityContext: seccompProfile: type: RuntimeDefault - securityContext: allowPrivilegeEscalation: false - resources: requests: memory: "500Mi" @@ -58,7 +47,6 @@ microservice-chart: limits: memory: "500Mi" cpu: "350m" - autoscaling: minReplica: 1 maxReplica: 2 @@ -77,7 +65,6 @@ microservice-chart: # metricAggregationInterval: "-1:1:0" metricAggregationType: Count targetValue: "30" - envConfig: COSMOS_URI: https://pagopa-u-weu-gps-cosmos-account.documents.azure.com:443/ COSMOS_DATABASE: "db" @@ -95,17 +82,11 @@ microservice-chart: RETRY_EXT_SERVICE_MAX_ATTEMPTS: "1" RETRY_EXT_SERVICE_MAX_DELAY: "200" LOGGING_LEVEL: "INFO" - envSecret: COSMOS_KEY: cosmos-gps-weu-u-pkey - keyvault: name: "pagopa-u-gps-kv" tenantId: "7788edaf-0346-4068-9d79-c868aed15b3d" - nodeSelector: {} - tolerations: [] - affinity: {} - diff --git a/openapi/openapi.json b/openapi/openapi.json index 7148406..54ef789 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -1,1783 +1,1783 @@ { - "openapi": "3.0.1", - "info": { - "title": "PagoPA API Spontaneous Payment", - "description": "Progetto Gestione Pagamenti Spontanei", - "termsOfService": "https://www.pagopa.gov.it/", - "version": "0.0.3-18" - }, - "servers": [ - { - "url": "http://localhost:8080", - "description": "Generated server url" - } - ], - "paths": { - "/organizations/{organizationFiscalCode}": { - "get": { - "tags": [ - "Enrollments API" - ], - "summary": "Return all enrollments for a creditor institution.", - "operationId": "getECEnrollments", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained all enrollments for the creditor institution.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the creditor institution.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "put": { - "tags": [ - "Enrollments API" - ], - "summary": "The organization updates the creditor institution.", - "operationId": "updateEC", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationModel" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Request updated.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationModelResponse" - } - } - } - }, - "400": { - "description": "Malformed request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the creditor institution.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "post": { - "tags": [ - "Enrollments API" - ], - "summary": "The organization creates a creditor institution with possible enrollments to services.", - "operationId": "createEC", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationEnrollmentModel" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Request created.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationModelResponse" - } - } - } - }, - "400": { - "description": "Malformed request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "The organization to create already exists.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "delete": { - "tags": [ - "Enrollments API" - ], - "summary": "The organization deletes the creditor institution.", - "operationId": "deleteEC", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Request deleted.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the creditor institution.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/organizations/{organizationFiscalCode}/services/{serviceId}": { - "get": { - "tags": [ - "Enrollments API" - ], - "summary": "Return the single enrollment to a service.", - "operationId": "getSingleEnrollment", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "serviceId", - "in": "path", - "description": "The service id to enroll.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained single enrollment.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrollmentModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the enroll service.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "put": { - "tags": [ - "Enrollments API" - ], - "summary": "The organization update an enrollment to a service for the creditor institution.", - "operationId": "updateECEnrollment", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "serviceId", - "in": "path", - "description": "The service id to enroll.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrollmentModel" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Request updated.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationModelResponse" - } - } - } - }, - "400": { - "description": "Malformed request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the creditor institution or the enroll service.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "post": { - "tags": [ - "Enrollments API" - ], - "summary": "The organization creates an enrollment to a service for the creditor institution.", - "operationId": "createECEnrollment", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "serviceId", - "in": "path", - "description": "The service id to enroll.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnrollmentModel" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Request created.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrganizationModelResponse" - } - } - } - }, - "400": { - "description": "Malformed request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the creditor institution or the enroll service.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "409": { - "description": "The enrollment to the service already exists.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "delete": { - "tags": [ - "Enrollments API" - ], - "summary": "The organization deletes the enrollment to service for the creditor institution.", - "operationId": "deleteECEnrollment", - "parameters": [ - { - "name": "organizationFiscalCode", - "in": "path", - "description": "The fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "serviceId", - "in": "path", - "description": "The service id to enroll.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Request deleted.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Not found the creditor institution or the enroll service.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/organizations/{organizationfiscalcode}/spontaneouspayments": { - "post": { - "tags": [ - "Payments API" - ], - "summary": "The Organization creates a spontaneous payment.", - "operationId": "createSpontaneousPayment", - "parameters": [ - { - "name": "organizationfiscalcode", - "in": "path", - "description": "Organization fiscal code, the fiscal code of the Organization.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpontaneousPaymentModel" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Request created.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentPositionModel" - } - } - } - }, - "400": { - "description": "Malformed request.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "description": "Conflict: duplicate debt position found.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/services": { - "get": { - "tags": [ - "Services API" - ], - "summary": "Return all services.", - "operationId": "getServices", - "responses": { - "200": { - "description": "Obtained all services.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServiceModelResponse" - } - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - }, - "/services/{serviceId}": { - "get": { - "tags": [ - "Services API" - ], - "summary": "Return the single service details.", - "operationId": "getServiceDetails", - "parameters": [ - { - "name": "serviceId", - "in": "path", - "description": "The service id for which to have the details.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Obtained single service details.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceDetailModelResponse" - } - } - } - }, - "401": { - "description": "Wrong or missing function key.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "No service found.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - }, - "500": { - "description": "Service unavailable.", - "headers": { - "X-Request-Id": { - "description": "This header identifies the call", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemJson" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - }, - { - "Authorization": [] - } - ] - }, - "parameters": [ - { - "name": "X-Request-Id", - "in": "header", - "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", - "schema": { - "type": "string" - } - } - ] - } - }, - "components": { - "schemas": { - "OrganizationModel": { - "type": "object", - "properties": { - "companyName": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "ENABLED", - "DISABLED" - ] - } - } - }, - "EnrollmentModelResponse": { - "required": [ - "iban", - "remittanceInformation", - "segregationCode", - "serviceId" - ], - "type": "object", - "properties": { - "serviceId": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "officeName": { - "type": "string" - }, - "segregationCode": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "postalIban": { - "type": "string" - } - } - }, - "OrganizationModelResponse": { - "required": [ - "companyName", - "fiscalCode", - "status" - ], - "type": "object", - "properties": { - "fiscalCode": { - "type": "string" - }, - "companyName": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "ENABLED", - "DISABLED" - ] - }, - "enrollments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EnrollmentModelResponse" - } - } - } - }, - "ProblemJson": { - "type": "object", - "properties": { - "title": { - "type": "string", - "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" - }, - "status": { - "maximum": 600, - "minimum": 100, - "type": "integer", - "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", - "format": "int32", - "example": 200 - }, - "detail": { - "type": "string", - "description": "A human readable explanation specific to this occurrence of the problem.", - "example": "There was an error processing the request" - } - } - }, - "EnrollmentModel": { - "required": [ - "iban", - "remittanceInformation", - "segregationCode" - ], - "type": "object", - "properties": { - "iban": { - "type": "string" - }, - "officeName": { - "type": "string" - }, - "segregationCode": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "postalIban": { - "type": "string" - } - } - }, - "DebtorModel": { - "required": [ - "fiscalCode", - "fullName", - "type" - ], - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "fiscalCode": { - "type": "string" - }, - "fullName": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "province": { - "type": "string" - }, - "region": { - "type": "string" - }, - "country": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - } - } - }, - "ServiceModel": { - "required": [ - "id", - "properties" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServicePropertyModel" - } - } - } - }, - "ServicePropertyModel": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - } - }, - "SpontaneousPaymentModel": { - "required": [ - "debtor", - "service" - ], - "type": "object", - "properties": { - "debtor": { - "$ref": "#/components/schemas/DebtorModel" - }, - "service": { - "$ref": "#/components/schemas/ServiceModel" - } - } - }, - "PaymentOptionModel": { - "required": [ - "amount", - "dueDate", - "isPartialPayment", - "iuv" - ], - "type": "object", - "properties": { - "iuv": { - "type": "string" - }, - "amount": { - "type": "integer", - "format": "int64" - }, - "description": { - "type": "string" - }, - "isPartialPayment": { - "type": "boolean" - }, - "dueDate": { - "type": "string", - "format": "date-time" - }, - "retentionDate": { - "type": "string", - "format": "date-time" - }, - "fee": { - "type": "integer", - "format": "int64" - }, - "transfer": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TransferModel" - } - } - } - }, - "PaymentPositionModel": { - "required": [ - "companyName", - "fiscalCode", - "fullName", - "iupd", - "type" - ], - "type": "object", - "properties": { - "iupd": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "F", - "G" - ] - }, - "fiscalCode": { - "type": "string" - }, - "fullName": { - "type": "string" - }, - "streetName": { - "type": "string" - }, - "civicNumber": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "province": { - "type": "string" - }, - "region": { - "type": "string" - }, - "country": { - "type": "string" - }, - "email": { - "type": "string" - }, - "phone": { - "type": "string" - }, - "switchToExpired": { - "type": "boolean", - "description": "feature flag to enable the debt position to expire after the due date", - "example": false, - "default": false - }, - "companyName": { - "type": "string" - }, - "officeName": { - "type": "string" - }, - "validityDate": { - "type": "string", - "format": "date-time" - }, - "status": { - "type": "string", - "readOnly": true, - "enum": [ - "DRAFT", - "PUBLISHED", - "VALID", - "INVALID", - "EXPIRED", - "PARTIALLY_PAID", - "PAID", - "REPORTED" - ] - }, - "paymentOption": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentOptionModel" - } - } - } - }, - "TransferModel": { - "required": [ - "amount", - "category", - "iban", - "idTransfer", - "remittanceInformation" - ], - "type": "object", - "properties": { - "idTransfer": { - "type": "string", - "enum": [ - "1", - "2", - "3", - "4", - "5" - ] - }, - "amount": { - "type": "integer", - "format": "int64" - }, - "remittanceInformation": { - "type": "string" - }, - "category": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "postalIban": { - "type": "string" - } - } - }, - "CreateEnrollmentModel": { - "required": [ - "iban", - "serviceId" - ], - "type": "object", - "properties": { - "serviceId": { - "type": "string" - }, - "iban": { - "type": "string" - }, - "officeName": { - "type": "string" - } - } - }, - "OrganizationEnrollmentModel": { - "required": [ - "companyName" - ], - "type": "object", - "properties": { - "companyName": { - "type": "string" - }, - "enrollments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CreateEnrollmentModel" - } - } - } - }, - "ServiceModelResponse": { - "required": [ - "id", - "name" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "ServiceDetailModelResponse": { - "required": [ - "id", - "remittanceInformation", - "status", - "transferCategory" - ], - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "transferCategory": { - "type": "string" - }, - "remittanceInformation": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "ENABLED", - "DISABLED" - ] - }, - "properties": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ServicePropertyModelResponse" - } - } - } - }, - "ServicePropertyModelResponse": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "required": { - "type": "boolean" - } - } - } - }, - "securitySchemes": { - "ApiKey": { - "type": "apiKey", - "description": "The API key to access this function app.", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - }, - "Authorization": { - "type": "http", - "description": "JWT token get after Azure Login", - "scheme": "bearer", - "bearerFormat": "JWT" - } - } - } -} \ No newline at end of file + "openapi": "3.0.1", + "info": { + "title": "PagoPA API Spontaneous Payment", + "description": "Progetto Gestione Pagamenti Spontanei", + "termsOfService": "https://www.pagopa.gov.it/", + "version": "0.0.3-19" + }, + "servers": [ + { + "url": "http://localhost:8080", + "description": "Generated server url" + } + ], + "paths": { + "/organizations/{organizationFiscalCode}": { + "get": { + "tags": [ + "Enrollments API" + ], + "summary": "Return all enrollments for a creditor institution.", + "operationId": "getECEnrollments", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained all enrollments for the creditor institution.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the creditor institution.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "put": { + "tags": [ + "Enrollments API" + ], + "summary": "The organization updates the creditor institution.", + "operationId": "updateEC", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationModel" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Request updated.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationModelResponse" + } + } + } + }, + "400": { + "description": "Malformed request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the creditor institution.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "post": { + "tags": [ + "Enrollments API" + ], + "summary": "The organization creates a creditor institution with possible enrollments to services.", + "operationId": "createEC", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationEnrollmentModel" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Request created.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationModelResponse" + } + } + } + }, + "400": { + "description": "Malformed request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "The organization to create already exists.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "delete": { + "tags": [ + "Enrollments API" + ], + "summary": "The organization deletes the creditor institution.", + "operationId": "deleteEC", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request deleted.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the creditor institution.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/organizations/{organizationFiscalCode}/services/{serviceId}": { + "get": { + "tags": [ + "Enrollments API" + ], + "summary": "Return the single enrollment to a service.", + "operationId": "getSingleEnrollment", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "serviceId", + "in": "path", + "description": "The service id to enroll.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained single enrollment.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnrollmentModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the enroll service.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "put": { + "tags": [ + "Enrollments API" + ], + "summary": "The organization update an enrollment to a service for the creditor institution.", + "operationId": "updateECEnrollment", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "serviceId", + "in": "path", + "description": "The service id to enroll.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnrollmentModel" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Request updated.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationModelResponse" + } + } + } + }, + "400": { + "description": "Malformed request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the creditor institution or the enroll service.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "post": { + "tags": [ + "Enrollments API" + ], + "summary": "The organization creates an enrollment to a service for the creditor institution.", + "operationId": "createECEnrollment", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "serviceId", + "in": "path", + "description": "The service id to enroll.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnrollmentModel" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Request created.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrganizationModelResponse" + } + } + } + }, + "400": { + "description": "Malformed request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the creditor institution or the enroll service.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "409": { + "description": "The enrollment to the service already exists.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "delete": { + "tags": [ + "Enrollments API" + ], + "summary": "The organization deletes the enrollment to service for the creditor institution.", + "operationId": "deleteECEnrollment", + "parameters": [ + { + "name": "organizationFiscalCode", + "in": "path", + "description": "The fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "serviceId", + "in": "path", + "description": "The service id to enroll.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Request deleted.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Not found the creditor institution or the enroll service.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/organizations/{organizationfiscalcode}/spontaneouspayments": { + "post": { + "tags": [ + "Payments API" + ], + "summary": "The Organization creates a spontaneous payment.", + "operationId": "createSpontaneousPayment", + "parameters": [ + { + "name": "organizationfiscalcode", + "in": "path", + "description": "Organization fiscal code, the fiscal code of the Organization.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpontaneousPaymentModel" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Request created.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentPositionModel" + } + } + } + }, + "400": { + "description": "Malformed request.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "description": "Conflict: duplicate debt position found.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/services": { + "get": { + "tags": [ + "Services API" + ], + "summary": "Return all services.", + "operationId": "getServices", + "responses": { + "200": { + "description": "Obtained all services.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceModelResponse" + } + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + }, + "/services/{serviceId}": { + "get": { + "tags": [ + "Services API" + ], + "summary": "Return the single service details.", + "operationId": "getServiceDetails", + "parameters": [ + { + "name": "serviceId", + "in": "path", + "description": "The service id for which to have the details.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Obtained single service details.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceDetailModelResponse" + } + } + } + }, + "401": { + "description": "Wrong or missing function key.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "No service found.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + }, + "500": { + "description": "Service unavailable.", + "headers": { + "X-Request-Id": { + "description": "This header identifies the call", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemJson" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + }, + { + "Authorization": [] + } + ] + }, + "parameters": [ + { + "name": "X-Request-Id", + "in": "header", + "description": "This header identifies the call, if not passed it is self-generated. This ID is returned in the response.", + "schema": { + "type": "string" + } + } + ] + } + }, + "components": { + "schemas": { + "OrganizationModel": { + "type": "object", + "properties": { + "companyName": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ] + } + } + }, + "EnrollmentModelResponse": { + "required": [ + "iban", + "remittanceInformation", + "segregationCode", + "serviceId" + ], + "type": "object", + "properties": { + "serviceId": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "officeName": { + "type": "string" + }, + "segregationCode": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "postalIban": { + "type": "string" + } + } + }, + "OrganizationModelResponse": { + "required": [ + "companyName", + "fiscalCode", + "status" + ], + "type": "object", + "properties": { + "fiscalCode": { + "type": "string" + }, + "companyName": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ] + }, + "enrollments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EnrollmentModelResponse" + } + } + } + }, + "ProblemJson": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable" + }, + "status": { + "maximum": 600, + "minimum": 100, + "type": "integer", + "description": "The HTTP status code generated by the origin server for this occurrence of the problem.", + "format": "int32", + "example": 200 + }, + "detail": { + "type": "string", + "description": "A human readable explanation specific to this occurrence of the problem.", + "example": "There was an error processing the request" + } + } + }, + "EnrollmentModel": { + "required": [ + "iban", + "remittanceInformation", + "segregationCode" + ], + "type": "object", + "properties": { + "iban": { + "type": "string" + }, + "officeName": { + "type": "string" + }, + "segregationCode": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "postalIban": { + "type": "string" + } + } + }, + "DebtorModel": { + "required": [ + "fiscalCode", + "fullName", + "type" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "F", + "G" + ] + }, + "fiscalCode": { + "type": "string" + }, + "fullName": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "province": { + "type": "string" + }, + "region": { + "type": "string" + }, + "country": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + } + } + }, + "ServiceModel": { + "required": [ + "id", + "properties" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServicePropertyModel" + } + } + } + }, + "ServicePropertyModel": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "SpontaneousPaymentModel": { + "required": [ + "debtor", + "service" + ], + "type": "object", + "properties": { + "debtor": { + "$ref": "#/components/schemas/DebtorModel" + }, + "service": { + "$ref": "#/components/schemas/ServiceModel" + } + } + }, + "PaymentOptionModel": { + "required": [ + "amount", + "dueDate", + "isPartialPayment", + "iuv" + ], + "type": "object", + "properties": { + "iuv": { + "type": "string" + }, + "amount": { + "type": "integer", + "format": "int64" + }, + "description": { + "type": "string" + }, + "isPartialPayment": { + "type": "boolean" + }, + "dueDate": { + "type": "string", + "format": "date-time" + }, + "retentionDate": { + "type": "string", + "format": "date-time" + }, + "fee": { + "type": "integer", + "format": "int64" + }, + "transfer": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TransferModel" + } + } + } + }, + "PaymentPositionModel": { + "required": [ + "companyName", + "fiscalCode", + "fullName", + "iupd", + "type" + ], + "type": "object", + "properties": { + "iupd": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "F", + "G" + ] + }, + "fiscalCode": { + "type": "string" + }, + "fullName": { + "type": "string" + }, + "streetName": { + "type": "string" + }, + "civicNumber": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "province": { + "type": "string" + }, + "region": { + "type": "string" + }, + "country": { + "type": "string" + }, + "email": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "switchToExpired": { + "type": "boolean", + "description": "feature flag to enable the debt position to expire after the due date", + "example": false, + "default": false + }, + "companyName": { + "type": "string" + }, + "officeName": { + "type": "string" + }, + "validityDate": { + "type": "string", + "format": "date-time" + }, + "status": { + "type": "string", + "readOnly": true, + "enum": [ + "DRAFT", + "PUBLISHED", + "VALID", + "INVALID", + "EXPIRED", + "PARTIALLY_PAID", + "PAID", + "REPORTED" + ] + }, + "paymentOption": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentOptionModel" + } + } + } + }, + "TransferModel": { + "required": [ + "amount", + "category", + "iban", + "idTransfer", + "remittanceInformation" + ], + "type": "object", + "properties": { + "idTransfer": { + "type": "string", + "enum": [ + "1", + "2", + "3", + "4", + "5" + ] + }, + "amount": { + "type": "integer", + "format": "int64" + }, + "remittanceInformation": { + "type": "string" + }, + "category": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "postalIban": { + "type": "string" + } + } + }, + "CreateEnrollmentModel": { + "required": [ + "iban", + "serviceId" + ], + "type": "object", + "properties": { + "serviceId": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "officeName": { + "type": "string" + } + } + }, + "OrganizationEnrollmentModel": { + "required": [ + "companyName" + ], + "type": "object", + "properties": { + "companyName": { + "type": "string" + }, + "enrollments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateEnrollmentModel" + } + } + } + }, + "ServiceModelResponse": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "ServiceDetailModelResponse": { + "required": [ + "id", + "remittanceInformation", + "status", + "transferCategory" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "transferCategory": { + "type": "string" + }, + "remittanceInformation": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ENABLED", + "DISABLED" + ] + }, + "properties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServicePropertyModelResponse" + } + } + } + }, + "ServicePropertyModelResponse": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "required": { + "type": "boolean" + } + } + } + }, + "securitySchemes": { + "ApiKey": { + "type": "apiKey", + "description": "The API key to access this function app.", + "name": "Ocp-Apim-Subscription-Key", + "in": "header" + }, + "Authorization": { + "type": "http", + "description": "JWT token get after Azure Login", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + } +} diff --git a/pom.xml b/pom.xml index ae24ff1..7f9610d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ it.gov.pagopa spontaneouspayment - 0.0.3-18 + 0.0.3-19 Gestione Pagamenti Spontanei Progetto Gestione Pagamenti Spontanei