diff --git a/openapi/generated.openapi.json b/openapi/generated.openapi.json index d887a94..391a723 100644 --- a/openapi/generated.openapi.json +++ b/openapi/generated.openapi.json @@ -3353,7 +3353,7 @@ } } }, - "DebtPositionTypeOrg" : { + "ReceiptNoPII" : { "type" : "object", "properties" : { "creationDate" : { @@ -3367,86 +3367,102 @@ "updateOperatorExternalId" : { "type" : "string" }, - "debtPositionTypeOrgId" : { + "receiptId" : { "type" : "integer", "format" : "int64" }, - "debtPositionTypeId" : { + "installmentId" : { "type" : "integer", "format" : "int64" }, - "organizationId" : { + "ingestionFlowFileId" : { "type" : "integer", "format" : "int64" }, - "balance" : { + "receiptOrigin" : { "type" : "string" }, - "code" : { + "paymentReceiptId" : { "type" : "string" }, - "description" : { + "noticeNumber" : { "type" : "string" }, - "iban" : { + "paymentNote" : { "type" : "string" }, - "postalIban" : { + "orgFiscalCode" : { "type" : "string" }, - "postalAccountCode" : { + "outcome" : { "type" : "string" }, - "holderPostalCc" : { + "creditorReferenceId" : { "type" : "string" }, - "orgSector" : { - "type" : "string" + "paymentAmountCents" : { + "type" : "integer", + "format" : "int64" }, - "xsdDefinitionRef" : { + "description" : { "type" : "string" }, - "amountCents" : { - "type" : "integer", - "format" : "int64" + "companyName" : { + "type" : "string" }, - "externalPaymentUrl" : { + "officeName" : { "type" : "string" }, - "flagAnonymousFiscalCode" : { - "type" : "boolean" + "idPsp" : { + "type" : "string" }, - "flagMandatoryDueDate" : { - "type" : "boolean" + "pspFiscalCode" : { + "type" : "string" }, - "flagSpontaneous" : { - "type" : "boolean" + "pspPartitaIva" : { + "type" : "string" }, - "flagNotifyIo" : { - "type" : "boolean" + "pspCompanyName" : { + "type" : "string" }, - "ioTemplateMessage" : { + "idChannel" : { "type" : "string" }, - "flagActive" : { - "type" : "boolean" + "channelDescription" : { + "type" : "string" }, - "flagNotifyOutcomePush" : { - "type" : "boolean" + "paymentMethod" : { + "type" : "string" }, - "notifyOutcomePushOrgSilServiceId" : { + "feeCents" : { "type" : "integer", "format" : "int64" }, - "flagAmountActualization" : { + "paymentDateTime" : { + "type" : "string", + "format" : "date-time" + }, + "applicationDate" : { + "type" : "string", + "format" : "date-time" + }, + "transferDate" : { + "type" : "string", + "format" : "date-time" + }, + "standin" : { "type" : "boolean" }, - "amountActualizationOrgSilServiceId" : { + "debtorEntityType" : { + "type" : "string" + }, + "personalDataId" : { "type" : "integer", "format" : "int64" }, - "flagExternal" : { - "type" : "boolean" + "debtorFiscalCodeHash" : { + "type" : "string", + "format" : "byte" }, "_links" : { "$ref" : "#/components/schemas/Links" @@ -3474,16 +3490,16 @@ } } }, - "PagedModelDebtPositionTypeOrg" : { + "PagedModelReceiptNoPII" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypeOrgs" : { + "receiptNoPIIs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionTypeOrg" + "$ref" : "#/components/schemas/ReceiptNoPII" } } } @@ -3496,94 +3512,116 @@ } } }, - "DebtPositionTypeWithCount" : { + "DebtPositionTypeOrg" : { "type" : "object", "properties" : { + "creationDate" : { + "type" : "string", + "format" : "date-time" + }, + "updateDate" : { + "type" : "string", + "format" : "date-time" + }, + "updateOperatorExternalId" : { + "type" : "string" + }, + "debtPositionTypeOrgId" : { + "type" : "integer", + "format" : "int64" + }, "debtPositionTypeId" : { "type" : "integer", "format" : "int64" }, + "organizationId" : { + "type" : "integer", + "format" : "int64" + }, + "balance" : { + "type" : "string" + }, "code" : { "type" : "string" }, "description" : { "type" : "string" }, - "updateDate" : { - "type" : "string", - "format" : "date-time" + "iban" : { + "type" : "string" }, - "activeOrganizations" : { + "postalIban" : { + "type" : "string" + }, + "postalAccountCode" : { + "type" : "string" + }, + "holderPostalCc" : { + "type" : "string" + }, + "orgSector" : { + "type" : "string" + }, + "xsdDefinitionRef" : { + "type" : "string" + }, + "amountCents" : { "type" : "integer", - "format" : "int32" + "format" : "int64" }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "PagedModelDebtPositionTypeWithCount" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "debtPositionTypeWithCounts" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/DebtPositionTypeWithCount" - } - } - } + "externalPaymentUrl" : { + "type" : "string" }, - "_links" : { - "$ref" : "#/components/schemas/Links" + "flagAnonymousFiscalCode" : { + "type" : "boolean" }, - "page" : { - "$ref" : "#/components/schemas/PageMetadata" - } - } - }, - "DebtPositionTypeOrgOperators" : { - "type" : "object", - "properties" : { - "creationDate" : { - "type" : "string", - "format" : "date-time" + "flagMandatoryDueDate" : { + "type" : "boolean" }, - "updateDate" : { - "type" : "string", - "format" : "date-time" + "flagSpontaneous" : { + "type" : "boolean" }, - "updateOperatorExternalId" : { + "flagNotifyIo" : { + "type" : "boolean" + }, + "ioTemplateMessage" : { "type" : "string" }, - "debtPositionTypeOrgOperatorId" : { + "flagActive" : { + "type" : "boolean" + }, + "flagNotifyOutcomePush" : { + "type" : "boolean" + }, + "notifyOutcomePushOrgSilServiceId" : { "type" : "integer", "format" : "int64" }, - "debtPositionTypeOrgId" : { + "flagAmountActualization" : { + "type" : "boolean" + }, + "amountActualizationOrgSilServiceId" : { "type" : "integer", "format" : "int64" }, - "operatorExternalUserId" : { - "type" : "string" + "flagExternal" : { + "type" : "boolean" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelDebtPositionTypeOrgOperators" : { + "PagedModelDebtPositionTypeOrg" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypeOrgOperatorses" : { + "debtPositionTypeOrgs" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionTypeOrgOperators" + "$ref" : "#/components/schemas/DebtPositionTypeOrg" } } } @@ -3596,7 +3634,21 @@ } } }, - "DebtPositionType" : { + "Stamp" : { + "type" : "object", + "properties" : { + "stampType" : { + "type" : "string" + }, + "stampHashDocument" : { + "type" : "string" + }, + "stampProvincialResidence" : { + "type" : "string" + } + } + }, + "PaymentOption" : { "type" : "object", "properties" : { "creationDate" : { @@ -3610,62 +3662,51 @@ "updateOperatorExternalId" : { "type" : "string" }, - "debtPositionTypeId" : { + "paymentOptionId" : { "type" : "integer", "format" : "int64" }, - "brokerId" : { + "debtPositionId" : { "type" : "integer", "format" : "int64" }, - "code" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "orgType" : { - "type" : "string" - }, - "macroArea" : { - "type" : "string" - }, - "serviceType" : { - "type" : "string" - }, - "collectingReason" : { - "type" : "string" - }, - "taxonomyCode" : { - "type" : "string" + "totalAmountCents" : { + "type" : "integer", + "format" : "int64" }, - "flagAnonymousFiscalCode" : { - "type" : "boolean" + "status" : { + "type" : "string", + "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] }, - "flagMandatoryDueDate" : { + "multiDebtor" : { "type" : "boolean" }, - "flagNotifyIo" : { - "type" : "boolean" + "dueDate" : { + "type" : "string", + "format" : "date-time" }, - "ioTemplateMessage" : { + "description" : { "type" : "string" }, + "paymentOptionType" : { + "type" : "string", + "enum" : [ "SINGLE_INSTALLMENT", "INSTALMENTS", "DOWN_PAYMENT" ] + }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelDebtPositionType" : { + "PagedModelPaymentOption" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositionTypes" : { + "paymentOptions" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPositionType" + "$ref" : "#/components/schemas/PaymentOption" } } } @@ -3678,17 +3719,41 @@ } } }, - "Stamp" : { + "CollectionModelInstallmentNoPII" : { "type" : "object", "properties" : { - "stampType" : { - "type" : "string" + "_embedded" : { + "type" : "object", + "properties" : { + "installmentNoPIIs" : { + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/InstallmentNoPIIResponse" + } + } + } }, - "stampHashDocument" : { - "type" : "string" + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, + "CollectionModelObject" : { + "type" : "object", + "properties" : { + "_embedded" : { + "type" : "object", + "properties" : { + "objects" : { + "type" : "array", + "items" : { + "type" : "object" + } + } + } }, - "stampProvincialResidence" : { - "type" : "string" + "_links" : { + "$ref" : "#/components/schemas/Links" } } }, @@ -3820,26 +3885,7 @@ } } }, - "CollectionModelObject" : { - "type" : "object", - "properties" : { - "_embedded" : { - "type" : "object", - "properties" : { - "objects" : { - "type" : "array", - "items" : { - "type" : "object" - } - } - } - }, - "_links" : { - "$ref" : "#/components/schemas/Links" - } - } - }, - "ReceiptNoPII" : { + "DebtPositionType" : { "type" : "object", "properties" : { "creationDate" : { @@ -3853,109 +3899,62 @@ "updateOperatorExternalId" : { "type" : "string" }, - "receiptId" : { - "type" : "integer", - "format" : "int64" - }, - "installmentId" : { + "debtPositionTypeId" : { "type" : "integer", "format" : "int64" }, - "paymentReceiptId" : { + "brokerId" : { "type" : "integer", "format" : "int64" }, - "noticeNumber" : { - "type" : "string" - }, - "orgFiscalCode" : { - "type" : "string" - }, - "outcome" : { - "type" : "string" - }, - "creditorReferenceId" : { + "code" : { "type" : "string" }, - "paymentAmountCents" : { - "type" : "integer", - "format" : "int64" - }, "description" : { "type" : "string" }, - "companyName" : { - "type" : "string" - }, - "officeName" : { - "type" : "string" - }, - "idPsp" : { - "type" : "string" - }, - "pspFiscalCode" : { - "type" : "string" - }, - "pspPartitaIva" : { + "orgType" : { "type" : "string" }, - "pspCompanyName" : { + "macroArea" : { "type" : "string" }, - "idChannel" : { + "serviceType" : { "type" : "string" }, - "channelDescription" : { + "collectingReason" : { "type" : "string" }, - "paymentMethod" : { + "taxonomyCode" : { "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" : { + "flagAnonymousFiscalCode" : { "type" : "boolean" }, - "debtorEntityType" : { - "type" : "string" + "flagMandatoryDueDate" : { + "type" : "boolean" }, - "personalDataId" : { - "type" : "integer", - "format" : "int64" + "flagNotifyIo" : { + "type" : "boolean" }, - "debtorFiscalCodeHash" : { - "type" : "string", - "format" : "byte" + "ioTemplateMessage" : { + "type" : "string" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelReceiptNoPII" : { + "PagedModelDebtPositionType" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "receiptNoPIIs" : { + "debtPositionTypes" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/ReceiptNoPII" + "$ref" : "#/components/schemas/DebtPositionType" } } } @@ -3968,72 +3967,42 @@ } } }, - "Transfer" : { + "DebtPositionTypeWithCount" : { "type" : "object", "properties" : { - "creationDate" : { - "type" : "string", - "format" : "date-time" - }, - "updateDate" : { - "type" : "string", - "format" : "date-time" - }, - "updateOperatorExternalId" : { - "type" : "string" - }, - "transferId" : { - "type" : "integer", - "format" : "int64" - }, - "installmentId" : { - "type" : "integer", - "format" : "int64" - }, - "orgFiscalCode" : { - "type" : "string" - }, - "orgName" : { - "type" : "string" - }, - "amountCents" : { + "debtPositionTypeId" : { "type" : "integer", "format" : "int64" }, - "remittanceInformation" : { - "type" : "string" - }, - "stamp" : { - "$ref" : "#/components/schemas/Stamp" - }, - "iban" : { + "code" : { "type" : "string" }, - "postalIban" : { + "description" : { "type" : "string" }, - "category" : { - "type" : "string" + "updateDate" : { + "type" : "string", + "format" : "date-time" }, - "transferIndex" : { + "activeOrganizations" : { "type" : "integer", - "format" : "int64" + "format" : "int32" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelTransfer" : { + "PagedModelDebtPositionTypeWithCount" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "transfers" : { + "debtPositionTypeWithCounts" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/Transfer" + "$ref" : "#/components/schemas/DebtPositionTypeWithCount" } } } @@ -4046,7 +4015,7 @@ } } }, - "PaymentOption" : { + "DebtPosition" : { "type" : "object", "properties" : { "creationDate" : { @@ -4060,51 +4029,62 @@ "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", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] + }, + "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", "INSTALMENTS", "DOWN_PAYMENT" ] + "format" : "date-time" + }, + "flagIuvVolatile" : { + "type" : "boolean" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelPaymentOption" : { + "PagedModelDebtPosition" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "paymentOptions" : { + "debtPositions" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PaymentOption" + "$ref" : "#/components/schemas/DebtPosition" } } } @@ -4117,16 +4097,16 @@ } } }, - "CollectionModelInstallmentNoPII" : { + "CollectionModelPaymentOption" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "installmentNoPIIs" : { + "paymentOptions" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/InstallmentNoPIIResponse" + "$ref" : "#/components/schemas/PaymentOptionResponse" } } } @@ -4136,7 +4116,7 @@ } } }, - "DebtPosition" : { + "DebtPositionTypeOrgOperators" : { "type" : "object", "properties" : { "creationDate" : { @@ -4150,29 +4130,7 @@ "updateOperatorExternalId" : { "type" : "string" }, - "debtPositionId" : { - "type" : "integer", - "format" : "int64" - }, - "iupdOrg" : { - "type" : "string" - }, - "description" : { - "type" : "string" - }, - "status" : { - "type" : "string", - "enum" : [ "TO_SYNC", "REPORTED", "PAID", "PARTIALLY_PAID", "CANCELLED", "INVALID", "EXPIRED", "UNPAID", "DRAFT" ] - }, - "ingestionFlowFileId" : { - "type" : "integer", - "format" : "int64" - }, - "ingestionFlowFileLineNumber" : { - "type" : "integer", - "format" : "int64" - }, - "organizationId" : { + "debtPositionTypeOrgOperatorId" : { "type" : "integer", "format" : "int64" }, @@ -4180,32 +4138,24 @@ "type" : "integer", "format" : "int64" }, - "notificationDate" : { - "type" : "string", - "format" : "date-time" - }, - "validityDate" : { - "type" : "string", - "format" : "date-time" - }, - "flagIuvVolatile" : { - "type" : "boolean" + "operatorExternalUserId" : { + "type" : "string" }, "_links" : { "$ref" : "#/components/schemas/Links" } } }, - "PagedModelDebtPosition" : { + "PagedModelDebtPositionTypeOrgOperators" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "debtPositions" : { + "debtPositionTypeOrgOperatorses" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/DebtPosition" + "$ref" : "#/components/schemas/DebtPositionTypeOrgOperators" } } } @@ -4218,22 +4168,81 @@ } } }, - "CollectionModelPaymentOption" : { + "Transfer" : { + "type" : "object", + "properties" : { + "creationDate" : { + "type" : "string", + "format" : "date-time" + }, + "updateDate" : { + "type" : "string", + "format" : "date-time" + }, + "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" : { + "type" : "integer", + "format" : "int64" + }, + "_links" : { + "$ref" : "#/components/schemas/Links" + } + } + }, + "PagedModelTransfer" : { "type" : "object", "properties" : { "_embedded" : { "type" : "object", "properties" : { - "paymentOptions" : { + "transfers" : { "type" : "array", "items" : { - "$ref" : "#/components/schemas/PaymentOptionResponse" + "$ref" : "#/components/schemas/Transfer" } } } }, "_links" : { "$ref" : "#/components/schemas/Links" + }, + "page" : { + "$ref" : "#/components/schemas/PageMetadata" } } }, @@ -4904,13 +4913,22 @@ "type" : "integer", "format" : "int64" }, - "paymentReceiptId" : { + "ingestionFlowFileId" : { "type" : "integer", "format" : "int64" }, + "receiptOrigin" : { + "type" : "string" + }, + "paymentReceiptId" : { + "type" : "string" + }, "noticeNumber" : { "type" : "string" }, + "paymentNote" : { + "type" : "string" + }, "orgFiscalCode" : { "type" : "string" }, @@ -5280,6 +5298,7 @@ } }, "ReceiptDTO" : { + "required" : [ "channelDescription", "companyName", "creditorReferenceId", "debtor", "description", "idChannel", "idPsp", "noticeNumber", "orgFiscalCode", "outcome", "payer", "paymentAmountCents", "paymentReceiptId", "pspCompanyName" ], "type" : "object", "properties" : { "receiptId" : { @@ -5290,12 +5309,22 @@ "type" : "integer", "format" : "int64" }, + "ingestionFlowFileId" : { + "type" : "integer", + "format" : "int64" + }, + "receiptOrigin" : { + "type" : "string" + }, "paymentReceiptId" : { "type" : "string" }, "noticeNumber" : { "type" : "string" }, + "paymentNote" : { + "type" : "string" + }, "orgFiscalCode" : { "type" : "string" }, @@ -5355,10 +5384,6 @@ "type" : "string", "format" : "date-time" }, - "receiptBytes" : { - "type" : "string", - "format" : "byte" - }, "standin" : { "type" : "boolean" }, diff --git a/openapi/p4pa-debt-position.openapi.yaml b/openapi/p4pa-debt-position.openapi.yaml index a3dc8b2..1100c78 100644 --- a/openapi/p4pa-debt-position.openapi.yaml +++ b/openapi/p4pa-debt-position.openapi.yaml @@ -287,6 +287,22 @@ components: format: int64 ReceiptDTO: type: object + required: + - receiptSource + - paymentReceiptId + - noticeNumber + - orgFiscalCode + - outcome + - creditorReferenceId + - paymentAmountCents + - description + - companyName + - idPsp + - pspCompanyName + - idChannel + - channelDescription + - debtor + - payer properties: receiptId: type: integer @@ -294,10 +310,17 @@ components: 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: @@ -339,9 +362,6 @@ components: transferDate: type: string format: date-time - receiptBytes: - type: string - format: byte standin: type: boolean debtor: diff --git a/src/main/java/it/gov/pagopa/pu/debtpositions/model/ReceiptNoPII.java b/src/main/java/it/gov/pagopa/pu/debtpositions/model/ReceiptNoPII.java index 6ca0f63..a95841a 100644 --- a/src/main/java/it/gov/pagopa/pu/debtpositions/model/ReceiptNoPII.java +++ b/src/main/java/it/gov/pagopa/pu/debtpositions/model/ReceiptNoPII.java @@ -22,8 +22,11 @@ public class ReceiptNoPII extends BaseEntity implements Serializable { @SequenceGenerator(name = "receipt_generator", sequenceName = "receipt_seq", allocationSize = 1) private Long receiptId; private Long installmentId; - private Long paymentReceiptId; + private Long ingestionFlowFileId; + private String receiptOrigin; + private String paymentReceiptId; private String noticeNumber; + private String paymentNote; private String orgFiscalCode; private String outcome; private String creditorReferenceId;