Represents an SDI (Sistema di Interscambio) recipient code used in electronic invoicing systems in Italy. This value class ensures that the provided string is a valid SDI recipient code by adhering to specific length constraints and pattern rules.

The SDI recipient code can either belong to a public administration (PA) if it contains 6 characters, or a private entity if it contains 7 characters.

<aside> <img src="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" alt="attachment:a3a56fc3-c53c-47ff-aacc-d7c34f62abfd:table_of_content.png" width="40px" />

TABLE OF CONTENT

</aside>

Package dev.tommasop1804.italyutils.classes
Since version 2026-02.1
Implemented interface CharSequence
Serialization tools.jackson
com.fasterxml.jackson
Deserialization tools.jackson
com.fasterxml.jackson
Database converter JPA (auto applied)
Value class :ij-kt-class: String
Type-Aliases CodiceDestinatarioSDI

Properties


:ij-field-value: isPA

Since version 2026-02.1
Type :ij-kt-class: Boolean
Dinamically computed ✔️

Indicates whether the SDI recipient code represents a public administration (PA) entity.

Returns true if the length of the code is exactly 6, which corresponds to codes associated with public administration entities.

Used to differentiate between public administration and private recipient codes based on their length.

:ij-field-value: isPrivate

Since version 2026-02.1
Type :ij-kt-class: Boolean
Dinamically computed ✔️

Indicates whether the current SDI recipient code represents a private recipient. A recipient code is considered private if its length is exactly 7 characters.

:ij-implementing-method::ij-field-value: length

Since version 2026-02.1
Type :ij-kt-class: Int
Overrides CharSequence
Dinamically computed ✔️