Class PersonConsentDataBasicPayload

  • Direct Known Subclasses:
    PersonConsentDataResponse

    public class PersonConsentDataBasicPayload
    extends Object
    Represents the communicational consent data for a person. This class is used to store consent information such as the consent name, its status (flag), the date it was updated, and any related metadata.

    Consent data is typically used for tracking a person's consent to communication preferences.

    Author:
    nikritikos
    • Constructor Detail

      • PersonConsentDataBasicPayload

        public PersonConsentDataBasicPayload()
    • Method Detail

      • getMetadata

        public List<ConsentMetadata> getMetadata()
        Retrieves the metadata list associated with this consent.
        Returns:
        a list of metadata associated with the consent
      • addMetadata

        public void addMetadata​(String key,
                                String value)
        Adds a metadata entry with a key and value to the metadata list.
        Parameters:
        key - the key for the metadata item
        value - the value for the metadata item
      • getFlag

        public Boolean getFlag()
        Retrieves the consent flag (whether consent is granted or not).
        Returns:
        true if consent is granted, false otherwise
      • setFlag

        public void setFlag​(Boolean flag)
        Sets the consent flag value.
        Parameters:
        flag - the new value indicating whether consent is granted (true) or not (false)
      • getUpdateDate

        public Date getUpdateDate()
        Retrieves the update date of the consent.
        Returns:
        the date and time when the consent was updated
      • setUpdateDate

        public void setUpdateDate​(Date updateDate)
        Sets the update date for the consent.
        Parameters:
        updateDate - the new date and time for when the consent was updated
      • getName

        public String getName()
        Retrieves the name of the consent.
        Returns:
        the unique name of the consent
      • setName

        public void setName​(String name)
        Sets the name for the consent.
        Parameters:
        name - the new name for the consent
      • toString

        public String toString()
        Returns a string representation of the consent data, including the name, flag, update date, and metadata.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the consent data