From 5ccf364f2929ff05ea1b852f060f1a8625197326 Mon Sep 17 00:00:00 2001 From: LarissaASLeite Date: Tue, 28 Jan 2025 11:42:53 +0100 Subject: [PATCH 1/4] P4ADEV-1978-fix-enum-status-dp --- openapi/generated.openapi.json | 750 +++++++++--------- openapi/p4pa-debt-position.openapi.yaml | 1 - .../statusalign/StatusRulesHandler.java | 8 +- .../DebtPositionStatusChecker.java | 4 +- .../PaymentOptionStatusChecker.java | 7 +- .../DebtPositionStatusCheckerTest.java | 20 - .../PaymentOptionStatusCheckerTest.java | 2 +- 7 files changed, 384 insertions(+), 408 deletions(-) diff --git a/openapi/generated.openapi.json b/openapi/generated.openapi.json index 393c7d9..125e10d 100644 --- a/openapi/generated.openapi.json +++ b/openapi/generated.openapi.json @@ -3715,7 +3715,7 @@ } } }, - "Transfer" : { + "DebtPositionTypeOrg" : { "type" : "object", "properties" : { "creationDate" : { @@ -3729,43 +3729,87 @@ "updateOperatorExternalId" : { "type" : "string" }, - "transferId" : { + "debtPositionTypeOrgId" : { "type" : "integer", "format" : "int64" }, - "installmentId" : { + "debtPositionTypeId" : { "type" : "integer", "format" : "int64" }, - "orgFiscalCode" : { + "organizationId" : { + "type" : "integer", + "format" : "int64" + }, + "balance" : { "type" : "string" }, - "orgName" : { + "code" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "iban" : { + "type" : "string" + }, + "postalIban" : { + "type" : "string" + }, + "postalAccountCode" : { + "type" : "string" + }, + "holderPostalCc" : { + "type" : "string" + }, + "orgSector" : { + "type" : "string" + }, + "xsdDefinitionRef" : { "type" : "string" }, "amountCents" : { "type" : "integer", "format" : "int64" }, - "remittanceInformation" : { + "externalPaymentUrl" : { "type" : "string" }, - "stamp" : { - "$ref" : "#/components/schemas/Stamp" + "flagAnonymousFiscalCode" : { + "type" : "boolean" }, - "iban" : { - "type" : "string" + "flagMandatoryDueDate" : { + "type" : "boolean" }, - "postalIban" : { - "type" : "string" + "flagSpontaneous" : { + "type" : "boolean" }, - "category" : { + "flagNotifyIo" : { + "type" : "boolean" + }, + "ioTemplateMessage" : { "type" : "string" }, - "transferIndex" : { + "flagActive" : { + "type" : "boolean" + }, + "flagNotifyOutcomePush" : { + "type" : "boolean" + }, + "notifyOutcomePushOrgSilServiceId" : { "type" : "integer", "format" : "int64" }, + "flagAmountActualization" : { + "type" : "boolean" + }, + "amountActualizationOrgSilServiceId" : { + "type" : "integer", + "format" : "int64" + }, + "flagExternal" : { + "type" : "boolean" + }, "_links" : { "$ref" : "#/components/schemas/Links" } @@ -3792,16 +3836,16 @@ } } }, - "PagedModelTransfer" : { + "PagedModelDebtPositionTypeOrg" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "transfers" : { + "debtPositionTypeOrgs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/Transfer" + "$ref" : "#/components/schemas/DebtPositionTypeOrg" } } } @@ -3814,21 +3858,7 @@ } } }, - "Stamp" : { - "type" : "object", - "properties" : { - "stampType" : { - "type" : "string" - }, - "stampHashDocument" : { - "type" : "string" - }, - "stampProvincialResidence" : { - "type" : "string" - } - } - }, - "InstallmentNoPII" : { + "ReceiptNoPII" : { "type" : "object", "properties" : { "creationDate" : { @@ -3842,185 +3872,118 @@ "updateOperatorExternalId" : { "type" : "string" }, - "installmentId" : { + "receiptId" : { "type" : "integer", "format" : "int64" }, - "paymentOptionId" : { + "installmentId" : { "type" : "integer", "format" : "int64" }, - "status" : { - "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "ingestionFlowFileId" : { + "type" : "integer", + "format" : "int64" }, - "iupdPagopa" : { + "receiptOrigin" : { "type" : "string" }, - "iud" : { + "paymentReceiptId" : { "type" : "string" }, - "iuv" : { + "noticeNumber" : { "type" : "string" }, - "iur" : { + "paymentNote" : { "type" : "string" }, - "iuf" : { + "orgFiscalCode" : { "type" : "string" }, - "nav" : { + "outcome" : { "type" : "string" }, - "dueDate" : { - "type" : "string", - "format" : "date-time" - }, - "paymentTypeCode" : { + "creditorReferenceId" : { "type" : "string" }, - "amountCents" : { - "type" : "integer", - "format" : "int64" - }, - "notificationFeeCents" : { + "paymentAmountCents" : { "type" : "integer", "format" : "int64" }, - "remittanceInformation" : { + "description" : { "type" : "string" }, - "humanFriendlyRemittanceInformation" : { + "companyName" : { "type" : "string" }, - "balance" : { + "officeName" : { "type" : "string" }, - "legacyPaymentMetadata" : { + "idPsp" : { "type" : "string" }, - "personalDataId" : { - "type" : "integer", - "format" : "int64" - }, - "debtorEntityType" : { + "pspFiscalCode" : { "type" : "string" }, - "debtorFiscalCodeHash" : { - "type" : "string", - "format" : "byte" + "pspPartitaIva" : { + "type" : "string" }, - "syncStatusFrom" : { + "pspCompanyName" : { "type" : "string" }, - "syncStatusTo" : { + "idChannel" : { "type" : "string" }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "PagedModelInstallmentNoPII" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "installmentNoPIIs" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentNoPII" - } - } - } + "channelDescription" : { + "type" : "string" }, - "_links" : { - "$ref" : "#/components/schemas/Links" + "paymentMethod" : { + "type" : "string" }, - "page" : { - "$ref" : "#/components/schemas/PageMetadata" - } - } - }, - "CollectionModelTransfer" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "transfers" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/TransferResponse" - } - } - } + "feeCents" : { + "type" : "integer", + "format" : "int64" }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "CollectionModelObject" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "objects" : { - "type" : "array", - "items" : { - "type" : "object" - } - } - } + "paymentDateTime" : { + "type" : "string", + "format" : "date-time" }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "DebtPositionTypeOrgOperators" : { - "type" : "object", - "properties" : { - "creationDate" : { + "applicationDate" : { "type" : "string", "format" : "date-time" }, - "updateDate" : { + "transferDate" : { "type" : "string", "format" : "date-time" }, - "updateOperatorExternalId" : { - "type" : "string" + "standin" : { + "type" : "boolean" }, - "debtPositionTypeOrgOperatorId" : { - "type" : "integer", - "format" : "int64" + "debtorEntityType" : { + "type" : "string" }, - "debtPositionTypeOrgId" : { + "personalDataId" : { "type" : "integer", "format" : "int64" }, - "operatorExternalUserId" : { - "type" : "string" + "debtorFiscalCodeHash" : { + "type" : "string", + "format" : "byte" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelDebtPositionTypeOrgOperators" : { + "PagedModelReceiptNoPII" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypeOrgOperatorses" : { + "receiptNoPIIs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionTypeOrgOperators" + "$ref" : "#/components/schemas/ReceiptNoPII" } } } @@ -4033,7 +3996,7 @@ } } }, - "PaymentOption" : { + "DebtPosition" : { "type" : "object", "properties" : { "creationDate" : { @@ -4047,51 +4010,80 @@ "updateOperatorExternalId" : { "type" : "string" }, - "paymentOptionId" : { + "debtPositionId" : { "type" : "integer", "format" : "int64" }, - "debtPositionId" : { + "iupdOrg" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "status" : { + "type" : "string", + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "EXPIRED", "UNPAID", "DRAFT" ] + }, + "debtPositionOrigin" : { + "type" : "string", + "enum" : [ "ORDINARY", "SPONTANEOUS", "SECONDARY_ORG", "RECEIPT_FILE", "RECEIPT_PAGOPA", "REPORTING_PAGOPA" ] + }, + "ingestionFlowFileId" : { "type" : "integer", "format" : "int64" }, - "totalAmountCents" : { + "ingestionFlowFileLineNumber" : { "type" : "integer", "format" : "int64" }, - "status" : { - "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "organizationId" : { + "type" : "integer", + "format" : "int64" }, - "multiDebtor" : { - "type" : "boolean" + "debtPositionTypeOrgId" : { + "type" : "integer", + "format" : "int64" }, - "dueDate" : { + "notificationDate" : { "type" : "string", "format" : "date-time" }, - "description" : { - "type" : "string" - }, - "paymentOptionType" : { + "validityDate" : { "type" : "string", - "enum" : [ "SINGLE_INSTALLMENT", "INSTALLMENTS", "DOWN_PAYMENT" ] + "format" : "date-time" + }, + "flagIuvVolatile" : { + "type" : "boolean" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelPaymentOption" : { + "Stamp" : { + "type" : "object", + "properties" : { + "stampType" : { + "type" : "string" + }, + "stampHashDocument" : { + "type" : "string" + }, + "stampProvincialResidence" : { + "type" : "string" + } + } + }, + "PagedModelDebtPosition" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "paymentOptions" : { + "debtPositions" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PaymentOption" + "$ref" : "#/components/schemas/DebtPosition" } } } @@ -4104,16 +4096,16 @@ } } }, - "CollectionModelInstallmentNoPII" : { + "CollectionModelPaymentOption" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "installmentNoPIIs" : { + "paymentOptions" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/InstallmentNoPIIResponse" + "$ref" : "#/components/schemas/PaymentOptionResponse" } } } @@ -4123,7 +4115,26 @@ } } }, - "DebtPositionType" : { + "CollectionModelObject" : { + "type" : "object", + "properties" : { + "_embedded" : { + "type" : "object", + "properties" : { + "objects" : { + "type" : "array", + "items" : { + "type" : "object" + } + } + } + }, + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, + "Transfer" : { "type" : "object", "properties" : { "creationDate" : { @@ -4137,62 +4148,58 @@ "updateOperatorExternalId" : { "type" : "string" }, - "debtPositionTypeId" : { + "transferId" : { "type" : "integer", "format" : "int64" }, - "brokerId" : { + "installmentId" : { "type" : "integer", "format" : "int64" }, - "code" : { + "orgFiscalCode" : { "type" : "string" }, - "description" : { + "orgName" : { "type" : "string" }, - "orgType" : { - "type" : "string" + "amountCents" : { + "type" : "integer", + "format" : "int64" }, - "macroArea" : { + "remittanceInformation" : { "type" : "string" }, - "serviceType" : { - "type" : "string" + "stamp" : { + "$ref" : "#/components/schemas/Stamp" }, - "collectingReason" : { + "iban" : { "type" : "string" }, - "taxonomyCode" : { + "postalIban" : { "type" : "string" }, - "flagAnonymousFiscalCode" : { - "type" : "boolean" - }, - "flagMandatoryDueDate" : { - "type" : "boolean" - }, - "flagNotifyIo" : { - "type" : "boolean" - }, - "ioTemplateMessage" : { + "category" : { "type" : "string" }, + "transferIndex" : { + "type" : "integer", + "format" : "int64" + }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelDebtPositionType" : { + "PagedModelTransfer" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypes" : { + "transfers" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionType" + "$ref" : "#/components/schemas/Transfer" } } } @@ -4205,93 +4212,108 @@ } } }, - "DebtPosition" : { + "DebtPositionTypeWithCount" : { "type" : "object", "properties" : { - "creationDate" : { - "type" : "string", - "format" : "date-time" + "debtPositionTypeId" : { + "type" : "integer", + "format" : "int64" + }, + "code" : { + "type" : "string" + }, + "description" : { + "type" : "string" }, "updateDate" : { "type" : "string", "format" : "date-time" }, - "updateOperatorExternalId" : { - "type" : "string" + "activeOrganizations" : { + "type" : "integer", + "format" : "int32" }, - "debtPositionId" : { + "brokerId" : { "type" : "integer", "format" : "int64" }, - "iupdOrg" : { - "type" : "string" + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, + "PagedModelDebtPositionTypeWithCount" : { + "type" : "object", + "properties" : { + "_embedded" : { + "type" : "object", + "properties" : { + "debtPositionTypeWithCounts" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DebtPositionTypeWithCount" + } + } + } }, - "description" : { - "type" : "string" + "_links" : { + "$ref" : "#/components/schemas/Links" }, - "status" : { + "page" : { + "$ref" : "#/components/schemas/PageMetadata" + } + } + }, + "PaymentOption" : { + "type" : "object", + "properties" : { + "creationDate" : { "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "format" : "date-time" }, - "debtPositionOrigin" : { + "updateDate" : { "type" : "string", - "enum" : [ "ORDINARY", "SPONTANEOUS", "SECONDARY_ORG", "RECEIPT_FILE", "RECEIPT_PAGOPA", "REPORTING_PAGOPA" ] + "format" : "date-time" }, - "ingestionFlowFileId" : { - "type" : "integer", - "format" : "int64" + "updateOperatorExternalId" : { + "type" : "string" }, - "ingestionFlowFileLineNumber" : { + "paymentOptionId" : { "type" : "integer", "format" : "int64" }, - "organizationId" : { + "debtPositionId" : { "type" : "integer", "format" : "int64" }, - "debtPositionTypeOrgId" : { + "totalAmountCents" : { "type" : "integer", "format" : "int64" }, - "notificationDate" : { + "status" : { "type" : "string", - "format" : "date-time" + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] }, - "validityDate" : { + "multiDebtor" : { + "type" : "boolean" + }, + "dueDate" : { "type" : "string", "format" : "date-time" }, - "flagIuvVolatile" : { - "type" : "boolean" + "description" : { + "type" : "string" }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "PagedModelDebtPosition" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "debtPositions" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DebtPosition" - } - } - } + "paymentOptionType" : { + "type" : "string", + "enum" : [ "SINGLE_INSTALLMENT", "INSTALLMENTS", "DOWN_PAYMENT" ] }, "_links" : { "$ref" : "#/components/schemas/Links" - }, - "page" : { - "$ref" : "#/components/schemas/PageMetadata" } } }, - "CollectionModelPaymentOption" : { + "PagedModelPaymentOption" : { "type" : "object", "properties" : { "_embedded" : { @@ -4300,69 +4322,39 @@ "paymentOptions" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PaymentOptionResponse" + "$ref" : "#/components/schemas/PaymentOption" } } } }, "_links" : { "$ref" : "#/components/schemas/Links" - } - } - }, - "DebtPositionTypeWithCount" : { - "type" : "object", - "properties" : { - "debtPositionTypeId" : { - "type" : "integer", - "format" : "int64" - }, - "code" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "updateDate" : { - "type" : "string", - "format" : "date-time" - }, - "activeOrganizations" : { - "type" : "integer", - "format" : "int32" - }, - "brokerId" : { - "type" : "integer", - "format" : "int64" }, - "_links" : { - "$ref" : "#/components/schemas/Links" + "page" : { + "$ref" : "#/components/schemas/PageMetadata" } } }, - "PagedModelDebtPositionTypeWithCount" : { + "CollectionModelInstallmentNoPII" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypeWithCounts" : { + "installmentNoPIIs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionTypeWithCount" + "$ref" : "#/components/schemas/InstallmentNoPIIResponse" } } } }, "_links" : { "$ref" : "#/components/schemas/Links" - }, - "page" : { - "$ref" : "#/components/schemas/PageMetadata" } } }, - "DebtPositionTypeOrg" : { + "DebtPositionType" : { "type" : "object", "properties" : { "creationDate" : { @@ -4376,50 +4368,33 @@ "updateOperatorExternalId" : { "type" : "string" }, - "debtPositionTypeOrgId" : { - "type" : "integer", - "format" : "int64" - }, "debtPositionTypeId" : { "type" : "integer", "format" : "int64" }, - "organizationId" : { + "brokerId" : { "type" : "integer", "format" : "int64" }, - "balance" : { - "type" : "string" - }, "code" : { "type" : "string" }, "description" : { "type" : "string" }, - "iban" : { - "type" : "string" - }, - "postalIban" : { - "type" : "string" - }, - "postalAccountCode" : { + "orgType" : { "type" : "string" }, - "holderPostalCc" : { + "macroArea" : { "type" : "string" }, - "orgSector" : { + "serviceType" : { "type" : "string" }, - "xsdDefinitionRef" : { + "collectingReason" : { "type" : "string" }, - "amountCents" : { - "type" : "integer", - "format" : "int64" - }, - "externalPaymentUrl" : { + "taxonomyCode" : { "type" : "string" }, "flagAnonymousFiscalCode" : { @@ -4428,50 +4403,79 @@ "flagMandatoryDueDate" : { "type" : "boolean" }, - "flagSpontaneous" : { - "type" : "boolean" - }, "flagNotifyIo" : { "type" : "boolean" }, "ioTemplateMessage" : { "type" : "string" }, - "flagActive" : { - "type" : "boolean" + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, + "PagedModelDebtPositionType" : { + "type" : "object", + "properties" : { + "_embedded" : { + "type" : "object", + "properties" : { + "debtPositionTypes" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/DebtPositionType" + } + } + } }, - "flagNotifyOutcomePush" : { - "type" : "boolean" + "_links" : { + "$ref" : "#/components/schemas/Links" }, - "notifyOutcomePushOrgSilServiceId" : { + "page" : { + "$ref" : "#/components/schemas/PageMetadata" + } + } + }, + "DebtPositionTypeOrgOperators" : { + "type" : "object", + "properties" : { + "creationDate" : { + "type" : "string", + "format" : "date-time" + }, + "updateDate" : { + "type" : "string", + "format" : "date-time" + }, + "updateOperatorExternalId" : { + "type" : "string" + }, + "debtPositionTypeOrgOperatorId" : { "type" : "integer", "format" : "int64" }, - "flagAmountActualization" : { - "type" : "boolean" - }, - "amountActualizationOrgSilServiceId" : { + "debtPositionTypeOrgId" : { "type" : "integer", "format" : "int64" }, - "flagExternal" : { - "type" : "boolean" + "operatorExternalUserId" : { + "type" : "string" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelDebtPositionTypeOrg" : { + "PagedModelDebtPositionTypeOrgOperators" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypeOrgs" : { + "debtPositionTypeOrgOperatorses" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionTypeOrg" + "$ref" : "#/components/schemas/DebtPositionTypeOrgOperators" } } } @@ -4484,7 +4488,7 @@ } } }, - "ReceiptNoPII" : { + "InstallmentNoPII" : { "type" : "object", "properties" : { "creationDate" : { @@ -4498,118 +4502,95 @@ "updateOperatorExternalId" : { "type" : "string" }, - "receiptId" : { - "type" : "integer", - "format" : "int64" - }, "installmentId" : { "type" : "integer", "format" : "int64" }, - "ingestionFlowFileId" : { + "paymentOptionId" : { "type" : "integer", "format" : "int64" }, - "receiptOrigin" : { - "type" : "string" - }, - "paymentReceiptId" : { - "type" : "string" - }, - "noticeNumber" : { - "type" : "string" + "status" : { + "type" : "string", + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] }, - "paymentNote" : { + "iupdPagopa" : { "type" : "string" }, - "orgFiscalCode" : { + "iud" : { "type" : "string" }, - "outcome" : { + "iuv" : { "type" : "string" }, - "creditorReferenceId" : { + "iur" : { "type" : "string" }, - "paymentAmountCents" : { - "type" : "integer", - "format" : "int64" - }, - "description" : { + "iuf" : { "type" : "string" }, - "companyName" : { + "nav" : { "type" : "string" }, - "officeName" : { - "type" : "string" + "dueDate" : { + "type" : "string", + "format" : "date-time" }, - "idPsp" : { + "paymentTypeCode" : { "type" : "string" }, - "pspFiscalCode" : { - "type" : "string" + "amountCents" : { + "type" : "integer", + "format" : "int64" }, - "pspPartitaIva" : { - "type" : "string" + "notificationFeeCents" : { + "type" : "integer", + "format" : "int64" }, - "pspCompanyName" : { + "remittanceInformation" : { "type" : "string" }, - "idChannel" : { + "humanFriendlyRemittanceInformation" : { "type" : "string" }, - "channelDescription" : { + "balance" : { "type" : "string" }, - "paymentMethod" : { + "legacyPaymentMetadata" : { "type" : "string" }, - "feeCents" : { + "personalDataId" : { "type" : "integer", "format" : "int64" }, - "paymentDateTime" : { - "type" : "string", - "format" : "date-time" - }, - "applicationDate" : { - "type" : "string", - "format" : "date-time" - }, - "transferDate" : { - "type" : "string", - "format" : "date-time" - }, - "standin" : { - "type" : "boolean" - }, "debtorEntityType" : { "type" : "string" }, - "personalDataId" : { - "type" : "integer", - "format" : "int64" - }, "debtorFiscalCodeHash" : { "type" : "string", "format" : "byte" }, + "syncStatusFrom" : { + "type" : "string" + }, + "syncStatusTo" : { + "type" : "string" + }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelReceiptNoPII" : { + "PagedModelInstallmentNoPII" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "receiptNoPIIs" : { + "installmentNoPIIs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/ReceiptNoPII" + "$ref" : "#/components/schemas/InstallmentNoPII" } } } @@ -4622,6 +4603,25 @@ } } }, + "CollectionModelTransfer" : { + "type" : "object", + "properties" : { + "_embedded" : { + "type" : "object", + "properties" : { + "transfers" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferResponse" + } + } + } + }, + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, "DebtPositionTypeOrgOperatorsRequestBody" : { "type" : "object", "properties" : { @@ -4856,7 +4856,7 @@ }, "status" : { "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "EXPIRED", "UNPAID", "DRAFT" ] }, "debtPositionOrigin" : { "type" : "string", @@ -5416,7 +5416,7 @@ }, "status" : { "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "EXPIRED", "UNPAID", "DRAFT" ] }, "debtPositionOrigin" : { "type" : "string", diff --git a/openapi/p4pa-debt-position.openapi.yaml b/openapi/p4pa-debt-position.openapi.yaml index 2291349..dd8ab88 100644 --- a/openapi/p4pa-debt-position.openapi.yaml +++ b/openapi/p4pa-debt-position.openapi.yaml @@ -512,7 +512,6 @@ components: - PAID - PARTIALLY_PAID - CANCELLED - - INVALID - EXPIRED - UNPAID - DRAFT diff --git a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/StatusRulesHandler.java b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/StatusRulesHandler.java index ed6f0cc..facc8a4 100644 --- a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/StatusRulesHandler.java +++ b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/StatusRulesHandler.java @@ -14,19 +14,17 @@ public abstract class StatusRulesHandler, T, D> { private final E expiredStatus; private final E cancelledStatus; private final E reportedStatus; - private final E invalidStatus; private final Set allowedCancelledStatuses; private final Set emptyAllowedStatuses; - protected StatusRulesHandler(E syncStatus, E paidStatus, E unpaidStatus, E expiredStatus, E cancelledStatus, E reportedStatus, E invalidStatus) { + protected StatusRulesHandler(E syncStatus, E paidStatus, E unpaidStatus, E expiredStatus, E cancelledStatus, E reportedStatus) { this.syncStatus = syncStatus; this.paidStatus = paidStatus; this.unpaidStatus = unpaidStatus; this.expiredStatus = expiredStatus; this.cancelledStatus = cancelledStatus; this.reportedStatus = reportedStatus; - this.invalidStatus = invalidStatus; this.allowedCancelledStatuses = Set.of(cancelledStatus); this.emptyAllowedStatuses = Set.of(); @@ -67,10 +65,6 @@ public boolean isReported(List childrenStatusList) { return allMatch(childrenStatusList, reportedStatus, allowedCancelledStatuses); } - public boolean isInvalid(List childrenStatusList) { - return allMatch(childrenStatusList, invalidStatus, allowedCancelledStatuses); - } - public boolean isCancelled(List childrenStatusList) { return allMatch(childrenStatusList, cancelledStatus, emptyAllowedStatuses); } diff --git a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusChecker.java b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusChecker.java index 5e07bf6..ae9d1d7 100644 --- a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusChecker.java +++ b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusChecker.java @@ -17,7 +17,7 @@ public class DebtPositionStatusChecker extends StatusRulesHandler paymentOp return DebtPositionStatus.PAID; } else if (isReported(paymentOptionStatusList)){ return DebtPositionStatus.REPORTED; - } else if (isInvalid(paymentOptionStatusList)){ - return DebtPositionStatus.INVALID; } else if (isCancelled(paymentOptionStatusList)){ return DebtPositionStatus.CANCELLED; } else if (isExpired(paymentOptionStatusList)){ diff --git a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java index dd005ce..c792237 100644 --- a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java +++ b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java @@ -18,7 +18,7 @@ public class PaymentOptionStatusChecker extends StatusRulesHandler childrenStatusList) { return childrenStatusList.contains(InstallmentStatus.PAID) && (childrenStatusList.contains(InstallmentStatus.UNPAID) || childrenStatusList.contains(InstallmentStatus.EXPIRED)); } + + public boolean isInvalid(List childrenStatusList) { + return childrenStatusList.contains(InstallmentStatus.INVALID) && + childrenStatusList.stream().allMatch(status -> InstallmentStatus.INVALID.equals(status) || InstallmentStatus.CANCELLED.equals(status)); + } } diff --git a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusCheckerTest.java b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusCheckerTest.java index 200de90..31719d2 100644 --- a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusCheckerTest.java +++ b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/debtposition/DebtPositionStatusCheckerTest.java @@ -113,26 +113,6 @@ void testDeterminePaymentOptionStatus_Reported2() { assertEquals(DebtPositionStatus.REPORTED, result); } - /** - * Test if the status is INVALID when all paymentOptions are INVALID. - */ - @Test - void testCalculateNewStatus_Invalid() { - List paymentOptionStatusList = List.of(PaymentOptionStatus.INVALID, PaymentOptionStatus.INVALID); - DebtPositionStatus result = checker.calculateNewStatus(paymentOptionStatusList); - assertEquals(DebtPositionStatus.INVALID, result); - } - - /** - * Test if the status is INVALID when all paymentOptions are CANCELLED, with at least one INVALID. - */ - @Test - void testDeterminePaymentOptionStatus_Invalid2() { - List paymentOptionStatusList = List.of(PaymentOptionStatus.INVALID, PaymentOptionStatus.CANCELLED); - DebtPositionStatus result = checker.calculateNewStatus(paymentOptionStatusList); - assertEquals(DebtPositionStatus.INVALID, result); - } - /** * Test if the status is CANCELLED when all paymentOptions are CANCELLED. */ diff --git a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java index 6114b2c..e02ba12 100644 --- a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java +++ b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java @@ -138,7 +138,7 @@ void testCalculateNewStatus_Invalid() { */ @Test void testCalculateNewStatus_Invalid2() { - List installmentStatusList = List.of(InstallmentStatus.INVALID, InstallmentStatus.CANCELLED); + List installmentStatusList = List.of(InstallmentStatus.INVALID, InstallmentStatus.CANCELLED, InstallmentStatus.CANCELLED); PaymentOptionStatus result = checker.calculateNewStatus(installmentStatusList); assertEquals(PaymentOptionStatus.INVALID, result); } From aa773d90bc3a8f49ad0c2cac8d41060e6c4d8be4 Mon Sep 17 00:00:00 2001 From: LarissaASLeite Date: Tue, 28 Jan 2025 11:54:27 +0100 Subject: [PATCH 2/4] P4ADEV-1978-fix-enum-status-dp --- .../statusalign/paymentoption/PaymentOptionStatusChecker.java | 2 +- .../paymentoption/PaymentOptionStatusCheckerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java index c792237..c7b9884 100644 --- a/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java +++ b/src/main/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusChecker.java @@ -68,7 +68,7 @@ protected boolean isPartiallyPaid(List childrenStatusList) { (childrenStatusList.contains(InstallmentStatus.UNPAID) || childrenStatusList.contains(InstallmentStatus.EXPIRED)); } - public boolean isInvalid(List childrenStatusList) { + private boolean isInvalid(List childrenStatusList) { return childrenStatusList.contains(InstallmentStatus.INVALID) && childrenStatusList.stream().allMatch(status -> InstallmentStatus.INVALID.equals(status) || InstallmentStatus.CANCELLED.equals(status)); } diff --git a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java index e02ba12..6114b2c 100644 --- a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java +++ b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java @@ -138,7 +138,7 @@ void testCalculateNewStatus_Invalid() { */ @Test void testCalculateNewStatus_Invalid2() { - List installmentStatusList = List.of(InstallmentStatus.INVALID, InstallmentStatus.CANCELLED, InstallmentStatus.CANCELLED); + List installmentStatusList = List.of(InstallmentStatus.INVALID, InstallmentStatus.CANCELLED); PaymentOptionStatus result = checker.calculateNewStatus(installmentStatusList); assertEquals(PaymentOptionStatus.INVALID, result); } From ad6e694185dd82efd318e3e9f0f71570bb466ffa Mon Sep 17 00:00:00 2001 From: LarissaASLeite Date: Tue, 28 Jan 2025 12:10:11 +0100 Subject: [PATCH 3/4] P4ADEV-1978-fix-enum-status-dp --- .../paymentoption/PaymentOptionStatusCheckerTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java index 6114b2c..1a74dcb 100644 --- a/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java +++ b/src/test/java/it/gov/pagopa/pu/debtpositions/service/statusalign/paymentoption/PaymentOptionStatusCheckerTest.java @@ -173,6 +173,17 @@ void testCalculateNewStatus_InvalidStatus() { assertEquals("Unable to determine status for PaymentOption", exception.getMessage()); } + /** + * Test if an exception is thrown when the list of installments contains an invalid combination of statuses, + * including at least one INVALID, an unsupported status (e.g., EXPIRED), and CANCELLED. + */ + @Test + void testCalculateNewStatus_InvalidStatus2() { + List installmentStatusList = List.of(InstallmentStatus.INVALID, InstallmentStatus.EXPIRED, InstallmentStatus.CANCELLED); + Exception exception = assertThrows(InvalidValueException.class, () -> checker.calculateNewStatus(installmentStatusList)); + assertEquals("Unable to determine status for PaymentOption", exception.getMessage()); + } + @Test void testGetChildStatuses() { PaymentOption paymentOption = new PaymentOption(); From bc904129e7c8663797eaa11f8b4a1cf65aee2e02 Mon Sep 17 00:00:00 2001 From: LarissaASLeite Date: Tue, 28 Jan 2025 17:02:14 +0100 Subject: [PATCH 4/4] P4ADEV-1978-fix-enum-status-dp --- openapi/generated.openapi.json | 652 ++++++++++++++++----------------- 1 file changed, 326 insertions(+), 326 deletions(-) diff --git a/openapi/generated.openapi.json b/openapi/generated.openapi.json index 1510550..a587c81 100644 --- a/openapi/generated.openapi.json +++ b/openapi/generated.openapi.json @@ -3715,7 +3715,7 @@ } } }, - "DebtPositionType" : { + "Transfer" : { "type" : "object", "properties" : { "creationDate" : { @@ -3729,47 +3729,43 @@ "updateOperatorExternalId" : { "type" : "string" }, - "debtPositionTypeId" : { + "transferId" : { "type" : "integer", "format" : "int64" }, - "brokerId" : { + "installmentId" : { "type" : "integer", "format" : "int64" }, - "code" : { + "orgFiscalCode" : { "type" : "string" }, - "description" : { + "orgName" : { "type" : "string" }, - "orgType" : { - "type" : "string" + "amountCents" : { + "type" : "integer", + "format" : "int64" }, - "macroArea" : { + "remittanceInformation" : { "type" : "string" }, - "serviceType" : { - "type" : "string" + "stamp" : { + "$ref" : "#/components/schemas/Stamp" }, - "collectingReason" : { + "iban" : { "type" : "string" }, - "taxonomyCode" : { + "postalIban" : { "type" : "string" }, - "flagAnonymousFiscalCode" : { - "type" : "boolean" - }, - "flagMandatoryDueDate" : { - "type" : "boolean" - }, - "flagNotifyIo" : { - "type" : "boolean" - }, - "ioTemplateMessage" : { + "category" : { "type" : "string" }, + "transferIndex" : { + "type" : "integer", + "format" : "int64" + }, "_links" : { "$ref" : "#/components/schemas/Links" } @@ -3796,16 +3792,16 @@ } } }, - "PagedModelDebtPositionType" : { + "PagedModelTransfer" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypes" : { + "transfers" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionType" + "$ref" : "#/components/schemas/Transfer" } } } @@ -3818,7 +3814,21 @@ } } }, - "ReceiptNoPII" : { + "Stamp" : { + "type" : "object", + "properties" : { + "stampType" : { + "type" : "string" + }, + "stampHashDocument" : { + "type" : "string" + }, + "stampProvincialResidence" : { + "type" : "string" + } + } + }, + "InstallmentNoPII" : { "type" : "object", "properties" : { "creationDate" : { @@ -3832,118 +3842,106 @@ "updateOperatorExternalId" : { "type" : "string" }, - "receiptId" : { - "type" : "integer", - "format" : "int64" - }, "installmentId" : { "type" : "integer", "format" : "int64" }, - "ingestionFlowFileId" : { + "paymentOptionId" : { "type" : "integer", "format" : "int64" }, - "receiptOrigin" : { - "type" : "string" - }, - "paymentReceiptId" : { - "type" : "string" - }, - "noticeNumber" : { - "type" : "string" + "status" : { + "type" : "string", + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] }, - "paymentNote" : { + "iupdPagopa" : { "type" : "string" }, - "orgFiscalCode" : { + "iud" : { "type" : "string" }, - "outcome" : { + "iuv" : { "type" : "string" }, - "creditorReferenceId" : { + "iur" : { "type" : "string" }, - "paymentAmountCents" : { - "type" : "integer", - "format" : "int64" - }, - "description" : { + "iuf" : { "type" : "string" }, - "companyName" : { + "nav" : { "type" : "string" }, - "officeName" : { - "type" : "string" + "dueDate" : { + "type" : "string", + "format" : "date-time" }, - "idPsp" : { + "paymentTypeCode" : { "type" : "string" }, - "pspFiscalCode" : { - "type" : "string" + "amountCents" : { + "type" : "integer", + "format" : "int64" }, - "pspPartitaIva" : { - "type" : "string" + "notificationFeeCents" : { + "type" : "integer", + "format" : "int64" }, - "pspCompanyName" : { + "remittanceInformation" : { "type" : "string" }, - "idChannel" : { + "humanFriendlyRemittanceInformation" : { "type" : "string" }, - "channelDescription" : { + "balance" : { "type" : "string" }, - "paymentMethod" : { + "legacyPaymentMetadata" : { "type" : "string" }, - "feeCents" : { + "personalDataId" : { "type" : "integer", "format" : "int64" }, - "paymentDateTime" : { - "type" : "string", - "format" : "date-time" - }, - "applicationDate" : { - "type" : "string", - "format" : "date-time" - }, - "transferDate" : { - "type" : "string", - "format" : "date-time" - }, - "standin" : { - "type" : "boolean" - }, "debtorEntityType" : { "type" : "string" }, - "personalDataId" : { - "type" : "integer", - "format" : "int64" - }, "debtorFiscalCodeHash" : { "type" : "string", "format" : "byte" }, + "syncStatus" : { + "$ref" : "#/components/schemas/InstallmentSyncStatus" + }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelReceiptNoPII" : { + "InstallmentSyncStatus" : { + "required" : [ "syncStatusFrom", "syncStatusTo" ], + "type" : "object", + "properties" : { + "syncStatusFrom" : { + "type" : "string", + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + }, + "syncStatusTo" : { + "type" : "string", + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + } + } + }, + "PagedModelInstallmentNoPII" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "receiptNoPIIs" : { + "installmentNoPIIs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/ReceiptNoPII" + "$ref" : "#/components/schemas/InstallmentNoPII" } } } @@ -3956,55 +3954,41 @@ } } }, - "DebtPositionTypeWithCount" : { + "CollectionModelTransfer" : { "type" : "object", "properties" : { - "debtPositionTypeId" : { - "type" : "integer", - "format" : "int64" - }, - "code" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "updateDate" : { - "type" : "string", - "format" : "date-time" - }, - "activeOrganizations" : { - "type" : "integer", - "format" : "int32" - }, - "brokerId" : { - "type" : "integer", - "format" : "int64" + "_embedded" : { + "type" : "object", + "properties" : { + "transfers" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/TransferResponse" + } + } + } }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelDebtPositionTypeWithCount" : { + "CollectionModelObject" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypeWithCounts" : { + "objects" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionTypeWithCount" + "type" : "object" } } } }, "_links" : { "$ref" : "#/components/schemas/Links" - }, - "page" : { - "$ref" : "#/components/schemas/PageMetadata" } } }, @@ -4060,7 +4044,7 @@ } } }, - "Transfer" : { + "PaymentOption" : { "type" : "object", "properties" : { "creationDate" : { @@ -4074,239 +4058,73 @@ "updateOperatorExternalId" : { "type" : "string" }, - "transferId" : { - "type" : "integer", - "format" : "int64" - }, - "installmentId" : { - "type" : "integer", - "format" : "int64" - }, - "orgFiscalCode" : { - "type" : "string" - }, - "orgName" : { - "type" : "string" - }, - "amountCents" : { - "type" : "integer", - "format" : "int64" - }, - "remittanceInformation" : { - "type" : "string" - }, - "stamp" : { - "$ref" : "#/components/schemas/Stamp" - }, - "iban" : { - "type" : "string" - }, - "postalIban" : { - "type" : "string" - }, - "category" : { - "type" : "string" - }, - "transferIndex" : { + "paymentOptionId" : { "type" : "integer", "format" : "int64" }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "PagedModelTransfer" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "transfers" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Transfer" - } - } - } - }, - "_links" : { - "$ref" : "#/components/schemas/Links" - }, - "page" : { - "$ref" : "#/components/schemas/PageMetadata" - } - } - }, - "Stamp" : { - "type" : "object", - "properties" : { - "stampType" : { - "type" : "string" - }, - "stampHashDocument" : { - "type" : "string" - }, - "stampProvincialResidence" : { - "type" : "string" - } - } - }, - "InstallmentNoPII" : { - "type" : "object", - "properties" : { - "creationDate" : { - "type" : "string", - "format" : "date-time" - }, - "updateDate" : { - "type" : "string", - "format" : "date-time" - }, - "updateOperatorExternalId" : { - "type" : "string" - }, - "installmentId" : { + "debtPositionId" : { "type" : "integer", "format" : "int64" }, - "paymentOptionId" : { + "totalAmountCents" : { "type" : "integer", "format" : "int64" }, "status" : { "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] - }, - "iupdPagopa" : { - "type" : "string" - }, - "iud" : { - "type" : "string" - }, - "iuv" : { - "type" : "string" - }, - "iur" : { - "type" : "string" - }, - "iuf" : { - "type" : "string" + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] }, - "nav" : { - "type" : "string" + "multiDebtor" : { + "type" : "boolean" }, "dueDate" : { "type" : "string", "format" : "date-time" }, - "paymentTypeCode" : { - "type" : "string" - }, - "amountCents" : { - "type" : "integer", - "format" : "int64" - }, - "notificationFeeCents" : { - "type" : "integer", - "format" : "int64" - }, - "remittanceInformation" : { - "type" : "string" - }, - "humanFriendlyRemittanceInformation" : { - "type" : "string" - }, - "balance" : { - "type" : "string" - }, - "legacyPaymentMetadata" : { - "type" : "string" - }, - "personalDataId" : { - "type" : "integer", - "format" : "int64" - }, - "debtorEntityType" : { - "type" : "string" - }, - "debtorFiscalCodeHash" : { - "type" : "string", - "format" : "byte" - }, - "syncStatus" : { - "$ref" : "#/components/schemas/InstallmentSyncStatus" - }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "InstallmentSyncStatus" : { - "required" : [ "syncStatusFrom", "syncStatusTo" ], - "type" : "object", - "properties" : { - "syncStatusFrom" : { - "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] - }, - "syncStatusTo" : { - "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] - } - } - }, - "PagedModelInstallmentNoPII" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "installmentNoPIIs" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/InstallmentNoPII" - } - } - } + "description" : { + "type" : "string" + }, + "paymentOptionType" : { + "type" : "string", + "enum" : [ "SINGLE_INSTALLMENT", "INSTALLMENTS", "DOWN_PAYMENT" ] }, "_links" : { "$ref" : "#/components/schemas/Links" - }, - "page" : { - "$ref" : "#/components/schemas/PageMetadata" } } }, - "CollectionModelObject" : { + "PagedModelPaymentOption" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "objects" : { + "paymentOptions" : { "type" : "array", "items" : { - "type" : "object" + "$ref" : "#/components/schemas/PaymentOption" } } } }, "_links" : { "$ref" : "#/components/schemas/Links" + }, + "page" : { + "$ref" : "#/components/schemas/PageMetadata" } } }, - "CollectionModelTransfer" : { + "CollectionModelInstallmentNoPII" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "transfers" : { + "installmentNoPIIs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/TransferResponse" + "$ref" : "#/components/schemas/InstallmentNoPIIResponse" } } } @@ -4316,7 +4134,7 @@ } } }, - "PaymentOption" : { + "DebtPositionType" : { "type" : "object", "properties" : { "creationDate" : { @@ -4330,51 +4148,62 @@ "updateOperatorExternalId" : { "type" : "string" }, - "paymentOptionId" : { + "debtPositionTypeId" : { "type" : "integer", "format" : "int64" }, - "debtPositionId" : { + "brokerId" : { "type" : "integer", "format" : "int64" }, - "totalAmountCents" : { - "type" : "integer", - "format" : "int64" + "code" : { + "type" : "string" }, - "status" : { - "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "description" : { + "type" : "string" }, - "multiDebtor" : { - "type" : "boolean" + "orgType" : { + "type" : "string" }, - "dueDate" : { - "type" : "string", - "format" : "date-time" + "macroArea" : { + "type" : "string" }, - "description" : { + "serviceType" : { "type" : "string" }, - "paymentOptionType" : { - "type" : "string", - "enum" : [ "SINGLE_INSTALLMENT", "INSTALLMENTS", "DOWN_PAYMENT" ] + "collectingReason" : { + "type" : "string" + }, + "taxonomyCode" : { + "type" : "string" + }, + "flagAnonymousFiscalCode" : { + "type" : "boolean" + }, + "flagMandatoryDueDate" : { + "type" : "boolean" + }, + "flagNotifyIo" : { + "type" : "boolean" + }, + "ioTemplateMessage" : { + "type" : "string" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelPaymentOption" : { + "PagedModelDebtPositionType" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "paymentOptions" : { + "debtPositionTypes" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PaymentOption" + "$ref" : "#/components/schemas/DebtPositionType" } } } @@ -4387,22 +4216,55 @@ } } }, - "CollectionModelInstallmentNoPII" : { + "DebtPositionTypeWithCount" : { + "type" : "object", + "properties" : { + "debtPositionTypeId" : { + "type" : "integer", + "format" : "int64" + }, + "code" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "updateDate" : { + "type" : "string", + "format" : "date-time" + }, + "activeOrganizations" : { + "type" : "integer", + "format" : "int32" + }, + "brokerId" : { + "type" : "integer", + "format" : "int64" + }, + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, + "PagedModelDebtPositionTypeWithCount" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "installmentNoPIIs" : { + "debtPositionTypeWithCounts" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/InstallmentNoPIIResponse" + "$ref" : "#/components/schemas/DebtPositionTypeWithCount" } } } }, "_links" : { "$ref" : "#/components/schemas/Links" + }, + "page" : { + "$ref" : "#/components/schemas/PageMetadata" } } }, @@ -4432,7 +4294,7 @@ }, "status" : { "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "EXPIRED", "UNPAID", "DRAFT" ] }, "debtPositionOrigin" : { "type" : "string", @@ -4633,6 +4495,144 @@ } } }, + "ReceiptNoPII" : { + "type" : "object", + "properties" : { + "creationDate" : { + "type" : "string", + "format" : "date-time" + }, + "updateDate" : { + "type" : "string", + "format" : "date-time" + }, + "updateOperatorExternalId" : { + "type" : "string" + }, + "receiptId" : { + "type" : "integer", + "format" : "int64" + }, + "installmentId" : { + "type" : "integer", + "format" : "int64" + }, + "ingestionFlowFileId" : { + "type" : "integer", + "format" : "int64" + }, + "receiptOrigin" : { + "type" : "string" + }, + "paymentReceiptId" : { + "type" : "string" + }, + "noticeNumber" : { + "type" : "string" + }, + "paymentNote" : { + "type" : "string" + }, + "orgFiscalCode" : { + "type" : "string" + }, + "outcome" : { + "type" : "string" + }, + "creditorReferenceId" : { + "type" : "string" + }, + "paymentAmountCents" : { + "type" : "integer", + "format" : "int64" + }, + "description" : { + "type" : "string" + }, + "companyName" : { + "type" : "string" + }, + "officeName" : { + "type" : "string" + }, + "idPsp" : { + "type" : "string" + }, + "pspFiscalCode" : { + "type" : "string" + }, + "pspPartitaIva" : { + "type" : "string" + }, + "pspCompanyName" : { + "type" : "string" + }, + "idChannel" : { + "type" : "string" + }, + "channelDescription" : { + "type" : "string" + }, + "paymentMethod" : { + "type" : "string" + }, + "feeCents" : { + "type" : "integer", + "format" : "int64" + }, + "paymentDateTime" : { + "type" : "string", + "format" : "date-time" + }, + "applicationDate" : { + "type" : "string", + "format" : "date-time" + }, + "transferDate" : { + "type" : "string", + "format" : "date-time" + }, + "standin" : { + "type" : "boolean" + }, + "debtorEntityType" : { + "type" : "string" + }, + "personalDataId" : { + "type" : "integer", + "format" : "int64" + }, + "debtorFiscalCodeHash" : { + "type" : "string", + "format" : "byte" + }, + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, + "PagedModelReceiptNoPII" : { + "type" : "object", + "properties" : { + "_embedded" : { + "type" : "object", + "properties" : { + "receiptNoPIIs" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/ReceiptNoPII" + } + } + } + }, + "_links" : { + "$ref" : "#/components/schemas/Links" + }, + "page" : { + "$ref" : "#/components/schemas/PageMetadata" + } + } + }, "DebtPositionTypeOrgOperatorsRequestBody" : { "type" : "object", "properties" : { @@ -4867,7 +4867,7 @@ }, "status" : { "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "EXPIRED", "UNPAID", "DRAFT" ] }, "debtPositionOrigin" : { "type" : "string", @@ -5421,7 +5421,7 @@ }, "status" : { "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "EXPIRED", "UNPAID", "DRAFT" ] }, "debtPositionOrigin" : { "type" : "string",